diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 03:59:33 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-08-19 13:46:30 -0400 |
commit | 6d4028c644edc0a2e4a8c948ebf81e8f2f09726e (patch) | |
tree | 89368ad03dc603de4af756ba3e5260cee489f023 /drivers/i2c/busses/i2c-cbus-gpio.c | |
parent | cda2109a26eb6fa58acfeae878eed87492480eae (diff) |
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-cbus-gpio.c')
-rw-r--r-- | drivers/i2c/busses/i2c-cbus-gpio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-cbus-gpio.c b/drivers/i2c/busses/i2c-cbus-gpio.c index 1be13ac11dc5..2d46f13adfdf 100644 --- a/drivers/i2c/busses/i2c-cbus-gpio.c +++ b/drivers/i2c/busses/i2c-cbus-gpio.c | |||
@@ -233,8 +233,9 @@ static int cbus_i2c_probe(struct platform_device *pdev) | |||
233 | chost->clk_gpio = of_get_gpio(dnode, 0); | 233 | chost->clk_gpio = of_get_gpio(dnode, 0); |
234 | chost->dat_gpio = of_get_gpio(dnode, 1); | 234 | chost->dat_gpio = of_get_gpio(dnode, 1); |
235 | chost->sel_gpio = of_get_gpio(dnode, 2); | 235 | chost->sel_gpio = of_get_gpio(dnode, 2); |
236 | } else if (pdev->dev.platform_data) { | 236 | } else if (dev_get_platdata(&pdev->dev)) { |
237 | struct i2c_cbus_platform_data *pdata = pdev->dev.platform_data; | 237 | struct i2c_cbus_platform_data *pdata = |
238 | dev_get_platdata(&pdev->dev); | ||
238 | chost->clk_gpio = pdata->clk_gpio; | 239 | chost->clk_gpio = pdata->clk_gpio; |
239 | chost->dat_gpio = pdata->dat_gpio; | 240 | chost->dat_gpio = pdata->dat_gpio; |
240 | chost->sel_gpio = pdata->sel_gpio; | 241 | chost->sel_gpio = pdata->sel_gpio; |