diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 09:59:33 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-08-19 19:46:30 +0200 |
commit | 6d4028c644edc0a2e4a8c948ebf81e8f2f09726e (patch) | |
tree | 89368ad03dc603de4af756ba3e5260cee489f023 /drivers/i2c/busses/i2c-gpio.c | |
parent | i2c: omap: query STP always when NACK is received (diff) | |
download | linux-6d4028c644edc0a2e4a8c948ebf81e8f2f09726e.tar.xz linux-6d4028c644edc0a2e4a8c948ebf81e8f2f09726e.zip |
i2c: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-gpio.c')
-rw-r--r-- | drivers/i2c/busses/i2c-gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index bc6e139c6e7f..8cdb4f743e19 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c @@ -137,9 +137,9 @@ static int i2c_gpio_probe(struct platform_device *pdev) if (ret) return ret; } else { - if (!pdev->dev.platform_data) + if (!dev_get_platdata(&pdev->dev)) return -ENXIO; - pdata = pdev->dev.platform_data; + pdata = dev_get_platdata(&pdev->dev); sda_pin = pdata->sda_pin; scl_pin = pdata->scl_pin; } @@ -171,7 +171,7 @@ static int i2c_gpio_probe(struct platform_device *pdev) pdata->scl_pin = scl_pin; of_i2c_gpio_get_props(pdev->dev.of_node, pdata); } else { - memcpy(pdata, pdev->dev.platform_data, sizeof(*pdata)); + memcpy(pdata, dev_get_platdata(&pdev->dev), sizeof(*pdata)); } if (pdata->sda_is_open_drain) { |