diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-12-03 09:50:17 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-01-21 03:13:39 -0500 |
commit | ac99a037bce3e6ae16d45ffb26eadbfc518fc143 (patch) | |
tree | 8a96934e01841c5fb81358b2b55ad9d6dacae3ee /drivers/pinctrl | |
parent | 80ec831e8069c3da06bd96db196422d736d364bc (diff) |
pinctrl: abx500: Delete non-devicetree probe path
All instances of this device are now coming from device tree-
enabled platforms probing without using platform data.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-abx500.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index 5183e7bb8de3..62bd7cf79a3b 100644 --- a/drivers/pinctrl/pinctrl-abx500.c +++ b/drivers/pinctrl/pinctrl-abx500.c | |||
@@ -1218,21 +1218,15 @@ static const struct of_device_id abx500_gpio_match[] = { | |||
1218 | 1218 | ||
1219 | static int abx500_gpio_probe(struct platform_device *pdev) | 1219 | static int abx500_gpio_probe(struct platform_device *pdev) |
1220 | { | 1220 | { |
1221 | struct ab8500_platform_data *abx500_pdata = | ||
1222 | dev_get_platdata(pdev->dev.parent); | ||
1223 | struct abx500_gpio_platform_data *pdata = NULL; | ||
1224 | struct device_node *np = pdev->dev.of_node; | 1221 | struct device_node *np = pdev->dev.of_node; |
1222 | const struct of_device_id *match; | ||
1225 | struct abx500_pinctrl *pct; | 1223 | struct abx500_pinctrl *pct; |
1226 | const struct platform_device_id *platid = platform_get_device_id(pdev); | ||
1227 | unsigned int id = -1; | 1224 | unsigned int id = -1; |
1228 | int ret, err; | 1225 | int ret, err; |
1229 | int i; | 1226 | int i; |
1230 | 1227 | ||
1231 | if (abx500_pdata) | 1228 | if (!np) { |
1232 | pdata = abx500_pdata->gpio; | 1229 | dev_err(&pdev->dev, "gpio dt node missing\n"); |
1233 | |||
1234 | if (!(pdata || np)) { | ||
1235 | dev_err(&pdev->dev, "gpio dt and platform data missing\n"); | ||
1236 | return -ENODEV; | 1230 | return -ENODEV; |
1237 | } | 1231 | } |
1238 | 1232 | ||
@@ -1248,17 +1242,14 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
1248 | pct->parent = dev_get_drvdata(pdev->dev.parent); | 1242 | pct->parent = dev_get_drvdata(pdev->dev.parent); |
1249 | pct->chip = abx500gpio_chip; | 1243 | pct->chip = abx500gpio_chip; |
1250 | pct->chip.dev = &pdev->dev; | 1244 | pct->chip.dev = &pdev->dev; |
1251 | pct->chip.base = (np) ? -1 : pdata->gpio_base; | 1245 | pct->chip.base = -1; /* Dynamic allocation */ |
1252 | |||
1253 | if (platid) | ||
1254 | id = platid->driver_data; | ||
1255 | else if (np) { | ||
1256 | const struct of_device_id *match; | ||
1257 | 1246 | ||
1258 | match = of_match_device(abx500_gpio_match, &pdev->dev); | 1247 | match = of_match_device(abx500_gpio_match, &pdev->dev); |
1259 | if (match) | 1248 | if (!match) { |
1260 | id = (unsigned long)match->data; | 1249 | dev_err(&pdev->dev, "gpio dt not matching\n"); |
1250 | return -ENODEV; | ||
1261 | } | 1251 | } |
1252 | id = (unsigned long)match->data; | ||
1262 | 1253 | ||
1263 | /* Poke in other ASIC variants here */ | 1254 | /* Poke in other ASIC variants here */ |
1264 | switch (id) { | 1255 | switch (id) { |
@@ -1349,14 +1340,6 @@ static int abx500_gpio_remove(struct platform_device *pdev) | |||
1349 | return 0; | 1340 | return 0; |
1350 | } | 1341 | } |
1351 | 1342 | ||
1352 | static const struct platform_device_id abx500_pinctrl_id[] = { | ||
1353 | { "pinctrl-ab8500", PINCTRL_AB8500 }, | ||
1354 | { "pinctrl-ab8540", PINCTRL_AB8540 }, | ||
1355 | { "pinctrl-ab9540", PINCTRL_AB9540 }, | ||
1356 | { "pinctrl-ab8505", PINCTRL_AB8505 }, | ||
1357 | { }, | ||
1358 | }; | ||
1359 | |||
1360 | static struct platform_driver abx500_gpio_driver = { | 1343 | static struct platform_driver abx500_gpio_driver = { |
1361 | .driver = { | 1344 | .driver = { |
1362 | .name = "abx500-gpio", | 1345 | .name = "abx500-gpio", |
@@ -1365,7 +1348,6 @@ static struct platform_driver abx500_gpio_driver = { | |||
1365 | }, | 1348 | }, |
1366 | .probe = abx500_gpio_probe, | 1349 | .probe = abx500_gpio_probe, |
1367 | .remove = abx500_gpio_remove, | 1350 | .remove = abx500_gpio_remove, |
1368 | .id_table = abx500_pinctrl_id, | ||
1369 | }; | 1351 | }; |
1370 | 1352 | ||
1371 | static int __init abx500_gpio_init(void) | 1353 | static int __init abx500_gpio_init(void) |