aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-gpio.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-30 03:59:33 -0400
committerWolfram Sang <wsa@the-dreams.de>2013-08-19 13:46:30 -0400
commit6d4028c644edc0a2e4a8c948ebf81e8f2f09726e (patch)
tree89368ad03dc603de4af756ba3e5260cee489f023 /drivers/i2c/busses/i2c-gpio.c
parentcda2109a26eb6fa58acfeae878eed87492480eae (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-gpio.c')
-rw-r--r--drivers/i2c/busses/i2c-gpio.c6
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)
137 if (ret) 137 if (ret)
138 return ret; 138 return ret;
139 } else { 139 } else {
140 if (!pdev->dev.platform_data) 140 if (!dev_get_platdata(&pdev->dev))
141 return -ENXIO; 141 return -ENXIO;
142 pdata = pdev->dev.platform_data; 142 pdata = dev_get_platdata(&pdev->dev);
143 sda_pin = pdata->sda_pin; 143 sda_pin = pdata->sda_pin;
144 scl_pin = pdata->scl_pin; 144 scl_pin = pdata->scl_pin;
145 } 145 }
@@ -171,7 +171,7 @@ static int i2c_gpio_probe(struct platform_device *pdev)
171 pdata->scl_pin = scl_pin; 171 pdata->scl_pin = scl_pin;
172 of_i2c_gpio_get_props(pdev->dev.of_node, pdata); 172 of_i2c_gpio_get_props(pdev->dev.of_node, pdata);
173 } else { 173 } else {
174 memcpy(pdata, pdev->dev.platform_data, sizeof(*pdata)); 174 memcpy(pdata, dev_get_platdata(&pdev->dev), sizeof(*pdata));
175 } 175 }
176 176
177 if (pdata->sda_is_open_drain) { 177 if (pdata->sda_is_open_drain) {