* [PATCH 0/3] can: remove unnecessary pci_set_drvdata()
@ 2013-09-10 11:05 Jingoo Han
2013-09-10 11:08 ` [PATCH 1/3] can: c_can: " Jingoo Han
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jingoo Han @ 2013-09-10 11:05 UTC (permalink / raw)
To: 'Marc Kleine-Budde'
Cc: 'Wolfgang Grandegger', linux-can, 'Jingoo Han'
Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound),
the driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
---
drivers/net/can/c_can/c_can_pci.c | 2 --
drivers/net/can/pch_can.c | 1 -
drivers/net/can/sja1000/ems_pci.c | 1 -
drivers/net/can/sja1000/kvaser_pci.c | 1 -
drivers/net/can/sja1000/peak_pci.c | 2 --
drivers/net/can/sja1000/plx_pci.c | 1 -
6 files changed, 8 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] can: c_can: remove unnecessary pci_set_drvdata()
2013-09-10 11:05 [PATCH 0/3] can: remove unnecessary pci_set_drvdata() Jingoo Han
@ 2013-09-10 11:08 ` Jingoo Han
2013-09-10 11:10 ` [PATCH 2/3] can: pch_can: " Jingoo Han
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2013-09-10 11:08 UTC (permalink / raw)
To: 'Marc Kleine-Budde'
Cc: 'Wolfgang Grandegger', linux-can, 'Federico Vaga',
'Alexander Stein', 'Jingoo Han'
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/can/c_can/c_can_pci.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
index b374be7..bce0be5 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,
return 0;
out_free_c_can:
- pci_set_drvdata(pdev, NULL);
free_c_can_dev(dev);
out_iounmap:
pci_iounmap(pdev, addr);
@@ -181,7 +180,6 @@ static void c_can_pci_remove(struct pci_dev *pdev)
unregister_c_can_dev(dev);
- pci_set_drvdata(pdev, NULL);
free_c_can_dev(dev);
pci_iounmap(pdev, priv->base);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] can: pch_can: remove unnecessary pci_set_drvdata()
2013-09-10 11:05 [PATCH 0/3] can: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-10 11:08 ` [PATCH 1/3] can: c_can: " Jingoo Han
@ 2013-09-10 11:10 ` Jingoo Han
2013-09-10 11:12 ` [PATCH 3/3] can: sja1000: " Jingoo Han
2013-09-10 11:17 ` [PATCH 0/3] can: " Marc Kleine-Budde
3 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2013-09-10 11:10 UTC (permalink / raw)
To: 'Marc Kleine-Budde'
Cc: 'Wolfgang Grandegger', linux-can,
'Toshiharu Okada', 'Tomoya MORINAGA',
'Jingoo Han'
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/can/pch_can.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 5c314a9..5f0e9b3 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)
pci_disable_msi(priv->dev);
pci_release_regions(pdev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
pch_can_reset(priv);
pci_iounmap(pdev, priv->regs);
free_candev(priv->ndev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] can: sja1000: remove unnecessary pci_set_drvdata()
2013-09-10 11:05 [PATCH 0/3] can: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-10 11:08 ` [PATCH 1/3] can: c_can: " Jingoo Han
2013-09-10 11:10 ` [PATCH 2/3] can: pch_can: " Jingoo Han
@ 2013-09-10 11:12 ` Jingoo Han
2013-09-10 11:17 ` [PATCH 0/3] can: " Marc Kleine-Budde
3 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2013-09-10 11:12 UTC (permalink / raw)
To: 'Marc Kleine-Budde'
Cc: 'Wolfgang Grandegger', linux-can,
'Oliver Hartkopp', 'Jingoo Han'
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/can/sja1000/ems_pci.c | 1 -
drivers/net/can/sja1000/kvaser_pci.c | 1 -
drivers/net/can/sja1000/peak_pci.c | 2 --
drivers/net/can/sja1000/plx_pci.c | 1 -
4 files changed, 5 deletions(-)
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
index 3752342..8359213 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)
kfree(card);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
}
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 217585b..087b13b 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)
pci_release_regions(pdev);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
}
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 6b6f0ad..065ca49 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)
pci_iounmap(pdev, cfg_base);
pci_release_regions(pdev);
pci_disable_device(pdev);
-
- pci_set_drvdata(pdev, NULL);
}
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 c52c1e9..f9b4f81 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)
kfree(card);
pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
}
/*
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] can: remove unnecessary pci_set_drvdata()
2013-09-10 11:05 [PATCH 0/3] can: remove unnecessary pci_set_drvdata() Jingoo Han
` (2 preceding siblings ...)
2013-09-10 11:12 ` [PATCH 3/3] can: sja1000: " Jingoo Han
@ 2013-09-10 11:17 ` Marc Kleine-Budde
3 siblings, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2013-09-10 11:17 UTC (permalink / raw)
To: Jingoo Han; +Cc: 'Wolfgang Grandegger', linux-can
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
On 09/10/2013 01:05 PM, Jingoo Han wrote:
> Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> (device-core: Ensure drvdata = NULL when no driver is bound),
> the driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
Tnx, all applied to net-next/testing. The series will be included in the
next pull request to David Miller.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-10 11:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 11:05 [PATCH 0/3] can: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-10 11:08 ` [PATCH 1/3] can: c_can: " Jingoo Han
2013-09-10 11:10 ` [PATCH 2/3] can: pch_can: " Jingoo Han
2013-09-10 11:12 ` [PATCH 3/3] can: sja1000: " Jingoo Han
2013-09-10 11:17 ` [PATCH 0/3] can: " Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).