* [PATCH 1/3] mfd: lpc_ich: remove unnecessary pci_set_drvdata()
@ 2013-09-12 6:41 Jingoo Han
2013-09-12 6:43 ` [PATCH 2/3] mfd: sm501: " Jingoo Han
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jingoo Han @ 2013-09-12 6:41 UTC (permalink / raw
To: Samuel Ortiz, Lee Jones
Cc: linux-kernel, 'Jingoo Han', 'Peter Tyser'
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/mfd/lpc_ich.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index 9483bc8..316af07 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -969,7 +969,6 @@ static int lpc_ich_probe(struct pci_dev *dev,
if (!cell_added) {
dev_warn(&dev->dev, "No MFD cells added\n");
lpc_ich_restore_config_space(dev);
- pci_set_drvdata(dev, NULL);
return -ENODEV;
}
@@ -980,7 +979,6 @@ static void lpc_ich_remove(struct pci_dev *dev)
{
mfd_remove_devices(&dev->dev);
lpc_ich_restore_config_space(dev);
- pci_set_drvdata(dev, NULL);
}
static struct pci_driver lpc_ich_driver = {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] mfd: sm501: remove unnecessary pci_set_drvdata()
2013-09-12 6:41 [PATCH 1/3] mfd: lpc_ich: remove unnecessary pci_set_drvdata() Jingoo Han
@ 2013-09-12 6:43 ` Jingoo Han
2013-09-12 15:11 ` Lee Jones
2013-09-12 6:44 ` [PATCH 3/3] mfd: timberdale: " Jingoo Han
2013-09-12 15:09 ` [PATCH 1/3] mfd: lpc_ich: " Lee Jones
2 siblings, 1 reply; 8+ messages in thread
From: Jingoo Han @ 2013-09-12 6:43 UTC (permalink / raw
To: 'Samuel Ortiz', 'Lee Jones'
Cc: linux-kernel, 'Jingoo Han', 'Guenter Roeck',
'Heiko Schocher'
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/mfd/sm501.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 3799a3d..c2c8c91 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1660,7 +1660,6 @@ static int sm501_pci_probe(struct pci_dev *dev,
err3:
pci_disable_device(dev);
err2:
- pci_set_drvdata(dev, NULL);
kfree(sm);
err1:
return err;
@@ -1695,7 +1694,6 @@ static void sm501_pci_remove(struct pci_dev *dev)
release_resource(sm->regs_claim);
kfree(sm->regs_claim);
- pci_set_drvdata(dev, NULL);
pci_disable_device(dev);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] mfd: timberdale: remove unnecessary pci_set_drvdata()
2013-09-12 6:41 [PATCH 1/3] mfd: lpc_ich: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-12 6:43 ` [PATCH 2/3] mfd: sm501: " Jingoo Han
@ 2013-09-12 6:44 ` Jingoo Han
2013-09-12 15:10 ` Lee Jones
2013-09-13 2:23 ` [PATCH V2] " Jingoo Han
2013-09-12 15:09 ` [PATCH 1/3] mfd: lpc_ich: " Lee Jones
2 siblings, 2 replies; 8+ messages in thread
From: Jingoo Han @ 2013-09-12 6:44 UTC (permalink / raw
To: 'Samuel Ortiz', 'Lee Jones'
Cc: linux-kernel, '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/mfd/timberdale.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index a6755ec..084767b 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -829,12 +829,10 @@ err_config:
err_ioremap:
release_mem_region(priv->ctl_mapbase, CHIPCTLSIZE);
err_request:
- pci_set_drvdata(dev, NULL);
err_start:
pci_disable_device(dev);
err_enable:
kfree(priv);
- pci_set_drvdata(dev, NULL);
return -ENODEV;
}
@@ -851,7 +849,6 @@ static void timb_remove(struct pci_dev *dev)
pci_disable_msix(dev);
pci_disable_device(dev);
- pci_set_drvdata(dev, NULL);
kfree(priv);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] mfd: lpc_ich: remove unnecessary pci_set_drvdata()
2013-09-12 6:41 [PATCH 1/3] mfd: lpc_ich: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-12 6:43 ` [PATCH 2/3] mfd: sm501: " Jingoo Han
2013-09-12 6:44 ` [PATCH 3/3] mfd: timberdale: " Jingoo Han
@ 2013-09-12 15:09 ` Lee Jones
2 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-09-12 15:09 UTC (permalink / raw
To: Jingoo Han; +Cc: Samuel Ortiz, linux-kernel, 'Peter Tyser'
On Thu, 12 Sep 2013, Jingoo Han wrote:
> 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/mfd/lpc_ich.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] mfd: timberdale: remove unnecessary pci_set_drvdata()
2013-09-12 6:44 ` [PATCH 3/3] mfd: timberdale: " Jingoo Han
@ 2013-09-12 15:10 ` Lee Jones
2013-09-13 2:23 ` [PATCH V2] " Jingoo Han
1 sibling, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-09-12 15:10 UTC (permalink / raw
To: Jingoo Han; +Cc: 'Samuel Ortiz', linux-kernel
On Thu, 12 Sep 2013, Jingoo Han wrote:
> 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/mfd/timberdale.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
> index a6755ec..084767b 100644
> --- a/drivers/mfd/timberdale.c
> +++ b/drivers/mfd/timberdale.c
> @@ -829,12 +829,10 @@ err_config:
> err_ioremap:
> release_mem_region(priv->ctl_mapbase, CHIPCTLSIZE);
> err_request:
> - pci_set_drvdata(dev, NULL);
So now err_request is redundant.
Can you clean that up in this patch also please?
> err_start:
> pci_disable_device(dev);
> err_enable:
> kfree(priv);
> - pci_set_drvdata(dev, NULL);
> return -ENODEV;
> }
>
> @@ -851,7 +849,6 @@ static void timb_remove(struct pci_dev *dev)
>
> pci_disable_msix(dev);
> pci_disable_device(dev);
> - pci_set_drvdata(dev, NULL);
> kfree(priv);
> }
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] mfd: sm501: remove unnecessary pci_set_drvdata()
2013-09-12 6:43 ` [PATCH 2/3] mfd: sm501: " Jingoo Han
@ 2013-09-12 15:11 ` Lee Jones
0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-09-12 15:11 UTC (permalink / raw
To: Jingoo Han
Cc: 'Samuel Ortiz', linux-kernel, 'Guenter Roeck',
'Heiko Schocher'
On Thu, 12 Sep 2013, Jingoo Han wrote:
> 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/mfd/sm501.c | 2 --
> 1 file changed, 2 deletions(-)
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V2] mfd: timberdale: remove unnecessary pci_set_drvdata()
2013-09-12 6:44 ` [PATCH 3/3] mfd: timberdale: " Jingoo Han
2013-09-12 15:10 ` Lee Jones
@ 2013-09-13 2:23 ` Jingoo Han
2013-09-13 7:07 ` Lee Jones
1 sibling, 1 reply; 8+ messages in thread
From: Jingoo Han @ 2013-09-13 2:23 UTC (permalink / raw
To: 'Lee Jones'
Cc: linux-kernel, 'Samuel Ortiz', '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. It also removes unnecessary label such
as 'err_request'.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- Removed unnecessary label such as 'err_request'.
drivers/mfd/timberdale.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index a6755ec..dbb34f9 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -678,7 +678,7 @@ static int timb_probe(struct pci_dev *dev,
priv->ctl_mapbase = mapbase + CHIPCTLOFFSET;
if (!request_mem_region(priv->ctl_mapbase, CHIPCTLSIZE, "timb-ctl")) {
dev_err(&dev->dev, "Failed to request ctl mem\n");
- goto err_request;
+ goto err_start;
}
priv->ctl_membase = ioremap(priv->ctl_mapbase, CHIPCTLSIZE);
@@ -828,13 +828,10 @@ err_config:
iounmap(priv->ctl_membase);
err_ioremap:
release_mem_region(priv->ctl_mapbase, CHIPCTLSIZE);
-err_request:
- pci_set_drvdata(dev, NULL);
err_start:
pci_disable_device(dev);
err_enable:
kfree(priv);
- pci_set_drvdata(dev, NULL);
return -ENODEV;
}
@@ -851,7 +848,6 @@ static void timb_remove(struct pci_dev *dev)
pci_disable_msix(dev);
pci_disable_device(dev);
- pci_set_drvdata(dev, NULL);
kfree(priv);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH V2] mfd: timberdale: remove unnecessary pci_set_drvdata()
2013-09-13 2:23 ` [PATCH V2] " Jingoo Han
@ 2013-09-13 7:07 ` Lee Jones
0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-09-13 7:07 UTC (permalink / raw
To: Jingoo Han; +Cc: linux-kernel, 'Samuel Ortiz'
On Fri, 13 Sep 2013, Jingoo Han wrote:
> 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. It also removes unnecessary label such
> as 'err_request'.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> Changes since v1:
> - Removed unnecessary label such as 'err_request'.
>
> drivers/mfd/timberdale.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
Looks fine to me now.
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-09-13 7:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12 6:41 [PATCH 1/3] mfd: lpc_ich: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-12 6:43 ` [PATCH 2/3] mfd: sm501: " Jingoo Han
2013-09-12 15:11 ` Lee Jones
2013-09-12 6:44 ` [PATCH 3/3] mfd: timberdale: " Jingoo Han
2013-09-12 15:10 ` Lee Jones
2013-09-13 2:23 ` [PATCH V2] " Jingoo Han
2013-09-13 7:07 ` Lee Jones
2013-09-12 15:09 ` [PATCH 1/3] mfd: lpc_ich: " Lee Jones
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 read-only IMAP folder(s) and NNTP newsgroup(s).