diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/at91_can.c | 2 | ||||
-rw-r--r-- | drivers/net/can/bfin_can.c | 2 | ||||
-rw-r--r-- | drivers/net/can/c_can/c_can_pci.c | 2 | ||||
-rw-r--r-- | drivers/net/can/cc770/cc770_platform.c | 4 | ||||
-rw-r--r-- | drivers/net/can/flexcan.c | 2 | ||||
-rw-r--r-- | drivers/net/can/janz-ican3.c | 2 | ||||
-rw-r--r-- | drivers/net/can/mcp251x.c | 2 | ||||
-rw-r--r-- | drivers/net/can/pch_can.c | 1 | ||||
-rw-r--r-- | drivers/net/can/sja1000/ems_pci.c | 1 | ||||
-rw-r--r-- | drivers/net/can/sja1000/kvaser_pci.c | 1 | ||||
-rw-r--r-- | drivers/net/can/sja1000/peak_pci.c | 2 | ||||
-rw-r--r-- | drivers/net/can/sja1000/plx_pci.c | 1 | ||||
-rw-r--r-- | drivers/net/can/sja1000/sja1000_platform.c | 2 | ||||
-rw-r--r-- | drivers/net/can/softing/softing_main.c | 2 | ||||
-rw-r--r-- | drivers/net/can/ti_hecc.c | 2 |
15 files changed, 10 insertions, 18 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 3b1ff6148702..64f2efaf7638 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c | |||
@@ -1347,7 +1347,7 @@ static int at91_can_probe(struct platform_device *pdev) | |||
1347 | priv->reg_base = addr; | 1347 | priv->reg_base = addr; |
1348 | priv->devtype_data = *devtype_data; | 1348 | priv->devtype_data = *devtype_data; |
1349 | priv->clk = clk; | 1349 | priv->clk = clk; |
1350 | priv->pdata = pdev->dev.platform_data; | 1350 | priv->pdata = dev_get_platdata(&pdev->dev); |
1351 | priv->mb0_id = 0x7ff; | 1351 | priv->mb0_id = 0x7ff; |
1352 | 1352 | ||
1353 | netif_napi_add(dev, &priv->napi, at91_poll, get_mb_rx_num(priv)); | 1353 | netif_napi_add(dev, &priv->napi, at91_poll, get_mb_rx_num(priv)); |
diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c index a2700d25ff0e..8a0b515b33ea 100644 --- a/drivers/net/can/bfin_can.c +++ b/drivers/net/can/bfin_can.c | |||
@@ -539,7 +539,7 @@ static int bfin_can_probe(struct platform_device *pdev) | |||
539 | struct resource *res_mem, *rx_irq, *tx_irq, *err_irq; | 539 | struct resource *res_mem, *rx_irq, *tx_irq, *err_irq; |
540 | unsigned short *pdata; | 540 | unsigned short *pdata; |
541 | 541 | ||
542 | pdata = pdev->dev.platform_data; | 542 | pdata = dev_get_platdata(&pdev->dev); |
543 | if (!pdata) { | 543 | if (!pdata) { |
544 | dev_err(&pdev->dev, "No platform data provided!\n"); | 544 | dev_err(&pdev->dev, "No platform data provided!\n"); |
545 | err = -EINVAL; | 545 | err = -EINVAL; |
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c index b374be7891a2..bce0be54c2f5 100644 --- a/drivers/net/can/c_can/c_can_pci.c +++ b/drivers/net/can/c_can/c_can_pci.c | |||
@@ -160,7 +160,6 @@ static int c_can_pci_probe(struct pci_dev *pdev, | |||
160 | return 0; | 160 | return 0; |
161 | 161 | ||
162 | out_free_c_can: | 162 | out_free_c_can: |
163 | pci_set_drvdata(pdev, NULL); | ||
164 | free_c_can_dev(dev); | 163 | free_c_can_dev(dev); |
165 | out_iounmap: | 164 | out_iounmap: |
166 | pci_iounmap(pdev, addr); | 165 | pci_iounmap(pdev, addr); |
@@ -181,7 +180,6 @@ static void c_can_pci_remove(struct pci_dev *pdev) | |||
181 | 180 | ||
182 | unregister_c_can_dev(dev); | 181 | unregister_c_can_dev(dev); |
183 | 182 | ||
184 | pci_set_drvdata(pdev, NULL); | ||
185 | free_c_can_dev(dev); | 183 | free_c_can_dev(dev); |
186 | 184 | ||
187 | pci_iounmap(pdev, priv->base); | 185 | pci_iounmap(pdev, priv->base); |
diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c index 034bdd816a60..ad76734b3ecc 100644 --- a/drivers/net/can/cc770/cc770_platform.c +++ b/drivers/net/can/cc770/cc770_platform.c | |||
@@ -152,7 +152,7 @@ static int cc770_get_platform_data(struct platform_device *pdev, | |||
152 | struct cc770_priv *priv) | 152 | struct cc770_priv *priv) |
153 | { | 153 | { |
154 | 154 | ||
155 | struct cc770_platform_data *pdata = pdev->dev.platform_data; | 155 | struct cc770_platform_data *pdata = dev_get_platdata(&pdev->dev); |
156 | 156 | ||
157 | priv->can.clock.freq = pdata->osc_freq; | 157 | priv->can.clock.freq = pdata->osc_freq; |
158 | if (priv->cpu_interface & CPUIF_DSC) | 158 | if (priv->cpu_interface & CPUIF_DSC) |
@@ -203,7 +203,7 @@ static int cc770_platform_probe(struct platform_device *pdev) | |||
203 | 203 | ||
204 | if (pdev->dev.of_node) | 204 | if (pdev->dev.of_node) |
205 | err = cc770_get_of_node_data(pdev, priv); | 205 | err = cc770_get_of_node_data(pdev, priv); |
206 | else if (pdev->dev.platform_data) | 206 | else if (dev_get_platdata(&pdev->dev)) |
207 | err = cc770_get_platform_data(pdev, priv); | 207 | err = cc770_get_platform_data(pdev, priv); |
208 | else | 208 | else |
209 | err = -ENODEV; | 209 | err = -ENODEV; |
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 71c677e651d7..e8c46bda07f5 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c | |||
@@ -1074,7 +1074,7 @@ static int flexcan_probe(struct platform_device *pdev) | |||
1074 | priv->dev = dev; | 1074 | priv->dev = dev; |
1075 | priv->clk_ipg = clk_ipg; | 1075 | priv->clk_ipg = clk_ipg; |
1076 | priv->clk_per = clk_per; | 1076 | priv->clk_per = clk_per; |
1077 | priv->pdata = pdev->dev.platform_data; | 1077 | priv->pdata = dev_get_platdata(&pdev->dev); |
1078 | priv->devtype_data = devtype_data; | 1078 | priv->devtype_data = devtype_data; |
1079 | 1079 | ||
1080 | priv->reg_xceiver = devm_regulator_get(&pdev->dev, "xceiver"); | 1080 | priv->reg_xceiver = devm_regulator_get(&pdev->dev, "xceiver"); |
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index 36bd6fa1c7f3..ab5909a7bae9 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c | |||
@@ -1769,7 +1769,7 @@ static int ican3_probe(struct platform_device *pdev) | |||
1769 | struct device *dev; | 1769 | struct device *dev; |
1770 | int ret; | 1770 | int ret; |
1771 | 1771 | ||
1772 | pdata = pdev->dev.platform_data; | 1772 | pdata = dev_get_platdata(&pdev->dev); |
1773 | if (!pdata) | 1773 | if (!pdata) |
1774 | return -ENXIO; | 1774 | return -ENXIO; |
1775 | 1775 | ||
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index fe7dd696957e..08ac401e0214 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c | |||
@@ -999,7 +999,7 @@ static int mcp251x_can_probe(struct spi_device *spi) | |||
999 | { | 999 | { |
1000 | struct net_device *net; | 1000 | struct net_device *net; |
1001 | struct mcp251x_priv *priv; | 1001 | struct mcp251x_priv *priv; |
1002 | struct mcp251x_platform_data *pdata = spi->dev.platform_data; | 1002 | struct mcp251x_platform_data *pdata = dev_get_platdata(&spi->dev); |
1003 | int ret = -ENODEV; | 1003 | int ret = -ENODEV; |
1004 | 1004 | ||
1005 | if (!pdata) | 1005 | if (!pdata) |
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c index 5c314a961970..5f0e9b3bfa7b 100644 --- a/drivers/net/can/pch_can.c +++ b/drivers/net/can/pch_can.c | |||
@@ -964,7 +964,6 @@ static void pch_can_remove(struct pci_dev *pdev) | |||
964 | pci_disable_msi(priv->dev); | 964 | pci_disable_msi(priv->dev); |
965 | pci_release_regions(pdev); | 965 | pci_release_regions(pdev); |
966 | pci_disable_device(pdev); | 966 | pci_disable_device(pdev); |
967 | pci_set_drvdata(pdev, NULL); | ||
968 | pch_can_reset(priv); | 967 | pch_can_reset(priv); |
969 | pci_iounmap(pdev, priv->regs); | 968 | pci_iounmap(pdev, priv->regs); |
970 | free_candev(priv->ndev); | 969 | free_candev(priv->ndev); |
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c index 3752342a678a..835921388e7b 100644 --- a/drivers/net/can/sja1000/ems_pci.c +++ b/drivers/net/can/sja1000/ems_pci.c | |||
@@ -207,7 +207,6 @@ static void ems_pci_del_card(struct pci_dev *pdev) | |||
207 | kfree(card); | 207 | kfree(card); |
208 | 208 | ||
209 | pci_disable_device(pdev); | 209 | pci_disable_device(pdev); |
210 | pci_set_drvdata(pdev, NULL); | ||
211 | } | 210 | } |
212 | 211 | ||
213 | static void ems_pci_card_reset(struct ems_pci_card *card) | 212 | static void ems_pci_card_reset(struct ems_pci_card *card) |
diff --git a/drivers/net/can/sja1000/kvaser_pci.c b/drivers/net/can/sja1000/kvaser_pci.c index 217585b97cd3..087b13bd300e 100644 --- a/drivers/net/can/sja1000/kvaser_pci.c +++ b/drivers/net/can/sja1000/kvaser_pci.c | |||
@@ -387,7 +387,6 @@ static void kvaser_pci_remove_one(struct pci_dev *pdev) | |||
387 | 387 | ||
388 | pci_release_regions(pdev); | 388 | pci_release_regions(pdev); |
389 | pci_disable_device(pdev); | 389 | pci_disable_device(pdev); |
390 | pci_set_drvdata(pdev, NULL); | ||
391 | } | 390 | } |
392 | 391 | ||
393 | static struct pci_driver kvaser_pci_driver = { | 392 | static struct pci_driver kvaser_pci_driver = { |
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c index 6b6f0ad75090..065ca49eb45e 100644 --- a/drivers/net/can/sja1000/peak_pci.c +++ b/drivers/net/can/sja1000/peak_pci.c | |||
@@ -744,8 +744,6 @@ static void peak_pci_remove(struct pci_dev *pdev) | |||
744 | pci_iounmap(pdev, cfg_base); | 744 | pci_iounmap(pdev, cfg_base); |
745 | pci_release_regions(pdev); | 745 | pci_release_regions(pdev); |
746 | pci_disable_device(pdev); | 746 | pci_disable_device(pdev); |
747 | |||
748 | pci_set_drvdata(pdev, NULL); | ||
749 | } | 747 | } |
750 | 748 | ||
751 | static struct pci_driver peak_pci_driver = { | 749 | static struct pci_driver peak_pci_driver = { |
diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c index c52c1e96bf90..f9b4f81cd86a 100644 --- a/drivers/net/can/sja1000/plx_pci.c +++ b/drivers/net/can/sja1000/plx_pci.c | |||
@@ -477,7 +477,6 @@ static void plx_pci_del_card(struct pci_dev *pdev) | |||
477 | kfree(card); | 477 | kfree(card); |
478 | 478 | ||
479 | pci_disable_device(pdev); | 479 | pci_disable_device(pdev); |
480 | pci_set_drvdata(pdev, NULL); | ||
481 | } | 480 | } |
482 | 481 | ||
483 | /* | 482 | /* |
diff --git a/drivers/net/can/sja1000/sja1000_platform.c b/drivers/net/can/sja1000/sja1000_platform.c index 8e259c541036..29f9b6321187 100644 --- a/drivers/net/can/sja1000/sja1000_platform.c +++ b/drivers/net/can/sja1000/sja1000_platform.c | |||
@@ -76,7 +76,7 @@ static int sp_probe(struct platform_device *pdev) | |||
76 | struct resource *res_mem, *res_irq; | 76 | struct resource *res_mem, *res_irq; |
77 | struct sja1000_platform_data *pdata; | 77 | struct sja1000_platform_data *pdata; |
78 | 78 | ||
79 | pdata = pdev->dev.platform_data; | 79 | pdata = dev_get_platdata(&pdev->dev); |
80 | if (!pdata) { | 80 | if (!pdata) { |
81 | dev_err(&pdev->dev, "No platform data provided!\n"); | 81 | dev_err(&pdev->dev, "No platform data provided!\n"); |
82 | err = -ENODEV; | 82 | err = -ENODEV; |
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index 65eef1eea2e2..6cd5c01b624d 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c | |||
@@ -768,7 +768,7 @@ static int softing_pdev_remove(struct platform_device *pdev) | |||
768 | 768 | ||
769 | static int softing_pdev_probe(struct platform_device *pdev) | 769 | static int softing_pdev_probe(struct platform_device *pdev) |
770 | { | 770 | { |
771 | const struct softing_platform_data *pdat = pdev->dev.platform_data; | 771 | const struct softing_platform_data *pdat = dev_get_platdata(&pdev->dev); |
772 | struct softing *card; | 772 | struct softing *card; |
773 | struct net_device *netdev; | 773 | struct net_device *netdev; |
774 | struct softing_priv *priv; | 774 | struct softing_priv *priv; |
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 3a349a22d5bc..beb5ef834f0f 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c | |||
@@ -894,7 +894,7 @@ static int ti_hecc_probe(struct platform_device *pdev) | |||
894 | void __iomem *addr; | 894 | void __iomem *addr; |
895 | int err = -ENODEV; | 895 | int err = -ENODEV; |
896 | 896 | ||
897 | pdata = pdev->dev.platform_data; | 897 | pdata = dev_get_platdata(&pdev->dev); |
898 | if (!pdata) { | 898 | if (!pdata) { |
899 | dev_err(&pdev->dev, "No platform data\n"); | 899 | dev_err(&pdev->dev, "No platform data\n"); |
900 | goto probe_exit; | 900 | goto probe_exit; |