aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/muxes
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/muxes
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/muxes')
-rw-r--r--drivers/i2c/muxes/i2c-arb-gpio-challenge.c2
-rw-r--r--drivers/i2c/muxes/i2c-mux-gpio.c8
-rw-r--r--drivers/i2c/muxes/i2c-mux-pca9541.c2
-rw-r--r--drivers/i2c/muxes/i2c-mux-pca954x.c2
-rw-r--r--drivers/i2c/muxes/i2c-mux-pinctrl.c2
5 files changed, 9 insertions, 7 deletions
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 210b6f7b9028..f7bf24375f81 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -131,7 +131,7 @@ static int i2c_arbitrator_probe(struct platform_device *pdev)
131 dev_err(dev, "Cannot find device tree node\n"); 131 dev_err(dev, "Cannot find device tree node\n");
132 return -ENODEV; 132 return -ENODEV;
133 } 133 }
134 if (dev->platform_data) { 134 if (dev_get_platdata(dev)) {
135 dev_err(dev, "Platform data is not supported\n"); 135 dev_err(dev, "Platform data is not supported\n");
136 return -EINVAL; 136 return -EINVAL;
137 } 137 }
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
diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux-pca9541.c
index 966a18a5d12d..c4f08ad31183 100644
--- a/drivers/i2c/muxes/i2c-mux-pca9541.c
+++ b/drivers/i2c/muxes/i2c-mux-pca9541.c
@@ -324,7 +324,7 @@ static int pca9541_probe(struct i2c_client *client,
324 const struct i2c_device_id *id) 324 const struct i2c_device_id *id)
325{ 325{
326 struct i2c_adapter *adap = client->adapter; 326 struct i2c_adapter *adap = client->adapter;
327 struct pca954x_platform_data *pdata = client->dev.platform_data; 327 struct pca954x_platform_data *pdata = dev_get_platdata(&client->dev);
328 struct pca9541 *data; 328 struct pca9541 *data;
329 int force; 329 int force;
330 int ret = -ENODEV; 330 int ret = -ENODEV;
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index a531d801dbe4..bad5b84a5985 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -185,7 +185,7 @@ static int pca954x_probe(struct i2c_client *client,
185 const struct i2c_device_id *id) 185 const struct i2c_device_id *id)
186{ 186{
187 struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent); 187 struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
188 struct pca954x_platform_data *pdata = client->dev.platform_data; 188 struct pca954x_platform_data *pdata = dev_get_platdata(&client->dev);
189 int num, force, class; 189 int num, force, class;
190 struct pca954x *data; 190 struct pca954x *data;
191 int ret = -ENODEV; 191 int ret = -ENODEV;
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
index a43c0ce5e3d8..0d082027c29a 100644
--- a/drivers/i2c/muxes/i2c-mux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c
@@ -145,7 +145,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev)
145 145
146 mux->dev = &pdev->dev; 146 mux->dev = &pdev->dev;
147 147
148 mux->pdata = pdev->dev.platform_data; 148 mux->pdata = dev_get_platdata(&pdev->dev);
149 if (!mux->pdata) { 149 if (!mux->pdata) {
150 ret = i2c_mux_pinctrl_parse_dt(mux, pdev); 150 ret = i2c_mux_pinctrl_parse_dt(mux, pdev);
151 if (ret < 0) 151 if (ret < 0)