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/muxes/i2c-mux-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/muxes/i2c-mux-gpio.c')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-gpio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c index 5a0ce0081dce..6a206e8d58f4 100644 --- a/drivers/i2c/muxes/i2c-mux-gpio.c +++ b/drivers/i2c/muxes/i2c-mux-gpio.c | |||
@@ -148,12 +148,14 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev) | |||
148 | 148 | ||
149 | platform_set_drvdata(pdev, mux); | 149 | platform_set_drvdata(pdev, mux); |
150 | 150 | ||
151 | if (!pdev->dev.platform_data) { | 151 | if (!dev_get_platdata(&pdev->dev)) { |
152 | ret = i2c_mux_gpio_probe_dt(mux, pdev); | 152 | ret = i2c_mux_gpio_probe_dt(mux, pdev); |
153 | if (ret < 0) | 153 | if (ret < 0) |
154 | return ret; | 154 | return ret; |
155 | } else | 155 | } else { |
156 | memcpy(&mux->data, pdev->dev.platform_data, sizeof(mux->data)); | 156 | memcpy(&mux->data, dev_get_platdata(&pdev->dev), |
157 | sizeof(mux->data)); | ||
158 | } | ||
157 | 159 | ||
158 | /* | 160 | /* |
159 | * If a GPIO chip name is provided, the GPIO pin numbers provided are | 161 | * If a GPIO chip name is provided, the GPIO pin numbers provided are |