* [PATCH 00/15] Convert to use devm_ioremap_resource
@ 2013-06-10 11:34 Tushar Behera
2013-06-10 11:35 ` [PATCH 12/15] ASoC: spear: " Tushar Behera
0 siblings, 1 reply; 8+ messages in thread
From: Tushar Behera @ 2013-06-10 11:34 UTC (permalink / raw)
To: linux-kernel
Cc: thierry.reding, patches, alsa-devel, devel, linux-can, linux-doc,
linux-gpio, linux-mmc, linux-pci, linux-usb, netdev, sparclinux,
Bjorn Helgaas, Chris Ball, Dan Williams, David S. Miller,
Felipe Balbi, Grant Likely, Greg Kroah-Hartman, Liam Girdwood,
Linus Walleij, Marc Kleine-Budde, Mark Brown, Michal Simek,
Rob Landley, Vinod Koul, Wolfgang Grandegger
These are the remaining instances of devm_request_and_ioremap. Convert
them to use devm_ioremap_resource as introduced by commit
75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()).
Patches 1 to 13 remove occurrences of devm_request_and_ioremap.
Patch 14 modifies one comment that speaks about devm_request_and_ioremap.
Patch 15 removes the definition of devm_request_and_ioremap which
should only be applied if all other pathces are merged.
Tushar Behera (15):
sparc,leon: Convert to use devm_ioremap_resource
sudmac: Convert to use devm_ioremap_resource
mmc: mvsdio: Convert to use devm_ioremap_resource
gpio_msm: Convert to use devm_ioremap_resource
gpio-sta2x11: Convert to use devm_ioremap_resource
net: bcm63xx_enet: Convert to use devm_ioremap_resource
net: fec: Convert to use devm_ioremap_resource
net: emaclite: Convert to use devm_ioremap_resource
net: can: Convert to use devm_ioremap_resource
Staging: netlogic: Convert to use devm_ioremap_resource
regulator: ti-abb: Convert to use devm_ioremap_resource
ASoC: spear: Convert to use devm_ioremap_resource
pci: mvebu: Convert to use devm_ioremap_resource
usb: phy: rcar-usb: Fix comment w.r.t. devm_ioremap_resource
lib: devres: Remove deprecated devm_request_and_ioremap
Documentation/driver-model/devres.txt | 1 -
arch/sparc/kernel/leon_pci_grpci1.c | 6 +++---
drivers/dma/sh/sudmac.c | 6 +++---
drivers/gpio/gpio-msm-v1.c | 12 +++++------
drivers/gpio/gpio-sta2x11.c | 4 +++-
drivers/mmc/host/mvsdio.c | 6 +++---
drivers/net/can/c_can/c_can_platform.c | 4 ++--
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 12 +++++------
drivers/net/ethernet/freescale/fec_main.c | 12 +++++------
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 6 ++++--
drivers/pci/host/pci-mvebu.c | 5 +++--
drivers/regulator/ti-abb-regulator.c | 12 +++++------
drivers/staging/netlogic/xlr_net.c | 8 +++----
drivers/usb/phy/phy-rcar-usb.c | 2 +-
include/linux/device.h | 2 --
lib/devres.c | 28 -------------------------
sound/soc/spear/spdif_out.c | 20 +++++-------------
17 files changed, 55 insertions(+), 91 deletions(-)
CC: alsa-devel@alsa-project.org
CC: devel@driverdev.osuosl.org
CC: linux-can@vger.kernel.org
CC: linux-doc@vger.kernel.org
CC: linux-gpio@vger.kernel.org
CC: linux-mmc@vger.kernel.org
CC: linux-pci@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: netdev@vger.kernel.org
CC: sparclinux@vger.kernel.org
CC: Bjorn Helgaas <bhelgaas@google.com>
CC: Chris Ball <cjb@laptop.org>
CC: Dan Williams <djbw@fb.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Felipe Balbi <balbi@ti.com>
CC: Grant Likely <grant.likely@linaro.org>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Marc Kleine-Budde <mkl@pengutronix.de>
CC: Mark Brown <broonie@kernel.org>
CC: Michal Simek <michal.simek@xilinx.com>
CC: Rob Landley <rob@landley.net>
CC: Vinod Koul <vinod.koul@intel.com>
CC: Wolfgang Grandegger <wg@grandegger.com>
--
1.7.9.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 12/15] ASoC: spear: Convert to use devm_ioremap_resource
2013-06-10 11:34 [PATCH 00/15] Convert to use devm_ioremap_resource Tushar Behera
@ 2013-06-10 11:35 ` Tushar Behera
2013-06-10 12:06 ` Sachin Kamat
2013-06-17 9:13 ` [PATCH V2 " Tushar Behera
0 siblings, 2 replies; 8+ messages in thread
From: Tushar Behera @ 2013-06-10 11:35 UTC (permalink / raw)
To: linux-kernel
Cc: thierry.reding, patches, alsa-devel, Liam Girdwood, Mark Brown
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: alsa-devel@alsa-project.org
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
---
sound/soc/spear/spdif_out.c | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index 4bde512..896ee7f 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -282,27 +282,17 @@ static int spdif_out_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
-
- if (!devm_request_mem_region(&pdev->dev, res->start,
- resource_size(res), pdev->name)) {
- dev_warn(&pdev->dev, "Failed to get memory resourse\n");
- return -ENOENT;
- }
-
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
if (!host) {
dev_warn(&pdev->dev, "kzalloc fail\n");
return -ENOMEM;
}
- host->io_base = devm_request_and_ioremap(&pdev->dev, res->start,
- resource_size(res));
- if (!host->io_base) {
- dev_warn(&pdev->dev, "ioremap failed\n");
- return -ENOMEM;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ host->io_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(host->io_base)) {
+ dev_warn(&pdev->dev, "devm_ioremap_resource failed\n");
+ return PTR_ERR(host->io_base);
}
host->clk = devm_clk_get(&pdev->dev, NULL);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 12/15] ASoC: spear: Convert to use devm_ioremap_resource
2013-06-10 11:35 ` [PATCH 12/15] ASoC: spear: " Tushar Behera
@ 2013-06-10 12:06 ` Sachin Kamat
2013-06-11 3:51 ` Tushar Behera
2013-06-17 9:13 ` [PATCH V2 " Tushar Behera
1 sibling, 1 reply; 8+ messages in thread
From: Sachin Kamat @ 2013-06-10 12:06 UTC (permalink / raw)
To: Tushar Behera
Cc: linux-kernel, thierry.reding, patches, alsa-devel, Liam Girdwood,
Mark Brown
On 10 June 2013 17:05, Tushar Behera <tushar.behera@linaro.org> wrote:
> Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
> introduced devm_ioremap_resource() and deprecated the use of
> devm_request_and_ioremap().
This patch does a little more than just conversion. May that change
could be mentioned here.
>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> CC: alsa-devel@alsa-project.org
> CC: Liam Girdwood <lgirdwood@gmail.com>
> CC: Mark Brown <broonie@kernel.org>
> ---
> sound/soc/spear/spdif_out.c | 20 +++++---------------
> 1 file changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
> index 4bde512..896ee7f 100644
> --- a/sound/soc/spear/spdif_out.c
> +++ b/sound/soc/spear/spdif_out.c
> @@ -282,27 +282,17 @@ static int spdif_out_probe(struct platform_device *pdev)
> struct resource *res;
> int ret;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -EINVAL;
> -
> - if (!devm_request_mem_region(&pdev->dev, res->start,
> - resource_size(res), pdev->name)) {
> - dev_warn(&pdev->dev, "Failed to get memory resourse\n");
> - return -ENOENT;
> - }
> -
> host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
> if (!host) {
> dev_warn(&pdev->dev, "kzalloc fail\n");
> return -ENOMEM;
> }
>
> - host->io_base = devm_request_and_ioremap(&pdev->dev, res->start,
> - resource_size(res));
> - if (!host->io_base) {
> - dev_warn(&pdev->dev, "ioremap failed\n");
> - return -ENOMEM;
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + host->io_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(host->io_base)) {
> + dev_warn(&pdev->dev, "devm_ioremap_resource failed\n");
This print is not needed as devm_ioremap_resource prints its own messages.
> + return PTR_ERR(host->io_base);
> }
>
> host->clk = devm_clk_get(&pdev->dev, NULL);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 12/15] ASoC: spear: Convert to use devm_ioremap_resource
2013-06-10 12:06 ` Sachin Kamat
@ 2013-06-11 3:51 ` Tushar Behera
0 siblings, 0 replies; 8+ messages in thread
From: Tushar Behera @ 2013-06-11 3:51 UTC (permalink / raw)
To: Sachin Kamat
Cc: linux-kernel, thierry.reding, patches, alsa-devel, Liam Girdwood,
Mark Brown
On 06/10/2013 05:36 PM, Sachin Kamat wrote:
> On 10 June 2013 17:05, Tushar Behera <tushar.behera@linaro.org> wrote:
>> Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
>> introduced devm_ioremap_resource() and deprecated the use of
>> devm_request_and_ioremap().
>
> This patch does a little more than just conversion. May that change
> could be mentioned here.
>
Sure. I will update that.
>>
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> CC: alsa-devel@alsa-project.org
>> CC: Liam Girdwood <lgirdwood@gmail.com>
>> CC: Mark Brown <broonie@kernel.org>
>> ---
>> sound/soc/spear/spdif_out.c | 20 +++++---------------
>> 1 file changed, 5 insertions(+), 15 deletions(-)
>>
>> diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
>> index 4bde512..896ee7f 100644
>> --- a/sound/soc/spear/spdif_out.c
>> +++ b/sound/soc/spear/spdif_out.c
>> @@ -282,27 +282,17 @@ static int spdif_out_probe(struct platform_device *pdev)
>> struct resource *res;
>> int ret;
>>
>> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (!res)
>> - return -EINVAL;
>> -
>> - if (!devm_request_mem_region(&pdev->dev, res->start,
>> - resource_size(res), pdev->name)) {
>> - dev_warn(&pdev->dev, "Failed to get memory resourse\n");
>> - return -ENOENT;
>> - }
>> -
>> host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
>> if (!host) {
>> dev_warn(&pdev->dev, "kzalloc fail\n");
>> return -ENOMEM;
>> }
>>
>> - host->io_base = devm_request_and_ioremap(&pdev->dev, res->start,
>> - resource_size(res));
>> - if (!host->io_base) {
>> - dev_warn(&pdev->dev, "ioremap failed\n");
>> - return -ENOMEM;
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + host->io_base = devm_ioremap_resource(&pdev->dev, res);
>> + if (IS_ERR(host->io_base)) {
>> + dev_warn(&pdev->dev, "devm_ioremap_resource failed\n");
>
> This print is not needed as devm_ioremap_resource prints its own messages.
>
>
Ok.
Thanks.
--
Tushar Behera
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V2 12/15] ASoC: spear: Convert to use devm_ioremap_resource
2013-06-10 11:35 ` [PATCH 12/15] ASoC: spear: " Tushar Behera
2013-06-10 12:06 ` Sachin Kamat
@ 2013-06-17 9:13 ` Tushar Behera
2013-06-17 10:20 ` Mark Brown
1 sibling, 1 reply; 8+ messages in thread
From: Tushar Behera @ 2013-06-17 9:13 UTC (permalink / raw)
To: linux-kernel
Cc: thierry.reding, patches, sachin.kamat, alsa-devel, Liam Girdwood,
Mark Brown
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
devm_request_mem_region is called in devm_ioremap_resource(). Hence that
part can also be removed.
Since devm_ioremap_resource prints error message on failure, there is
no need to print an explicit warning message.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: alsa-devel@alsa-project.org
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
---
Changes for V2:
* Removed redundant print of error message from devm_ioremap_resource
exit path
* Call to devm_request_mem_region is removed.
sound/soc/spear/spdif_out.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index 4bde512..64db05a 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -282,28 +282,16 @@ static int spdif_out_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
-
- if (!devm_request_mem_region(&pdev->dev, res->start,
- resource_size(res), pdev->name)) {
- dev_warn(&pdev->dev, "Failed to get memory resourse\n");
- return -ENOENT;
- }
-
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
if (!host) {
dev_warn(&pdev->dev, "kzalloc fail\n");
return -ENOMEM;
}
- host->io_base = devm_request_and_ioremap(&pdev->dev, res->start,
- resource_size(res));
- if (!host->io_base) {
- dev_warn(&pdev->dev, "ioremap failed\n");
- return -ENOMEM;
- }
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ host->io_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(host->io_base))
+ return PTR_ERR(host->io_base);
host->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(host->clk))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH V2 12/15] ASoC: spear: Convert to use devm_ioremap_resource
2013-06-17 9:13 ` [PATCH V2 " Tushar Behera
@ 2013-06-17 10:20 ` Mark Brown
2013-06-17 10:40 ` [PATCH V3 " Tushar Behera
0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2013-06-17 10:20 UTC (permalink / raw)
To: Tushar Behera
Cc: linux-kernel, thierry.reding, patches, sachin.kamat, alsa-devel,
Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
On Mon, Jun 17, 2013 at 02:43:08PM +0530, Tushar Behera wrote:
> Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
> introduced devm_ioremap_resource() and deprecated the use of
> devm_request_and_ioremap().
This doesn't apply against current code, please check and resend.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V3 12/15] ASoC: spear: Convert to use devm_ioremap_resource
2013-06-17 10:20 ` Mark Brown
@ 2013-06-17 10:40 ` Tushar Behera
2013-06-17 16:20 ` Mark Brown
0 siblings, 1 reply; 8+ messages in thread
From: Tushar Behera @ 2013-06-17 10:40 UTC (permalink / raw)
To: linux-kernel
Cc: thierry.reding, patches, sachin.kamat, alsa-devel, Liam Girdwood,
Mark Brown
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
devm_request_mem_region is called in devm_ioremap_resource(). Hence that
part can also be removed.
Since devm_ioremap_resource prints error message on failure, there is
no need to print an explicit warning message.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: alsa-devel@alsa-project.org
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
---
Changes for V3:
* Rebased on for-next branch of sound/soc git tree
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
Changes for V2:
* Removed redundant print of error message from devm_ioremap_resource
exit path
* Call to devm_request_mem_region is removed.
sound/soc/spear/spdif_out.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index a4a8748..2fdf68c 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -282,27 +282,16 @@ static int spdif_out_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
-
- if (!devm_request_mem_region(&pdev->dev, res->start,
- resource_size(res), pdev->name)) {
- dev_warn(&pdev->dev, "Failed to get memory resourse\n");
- return -ENOENT;
- }
-
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
if (!host) {
dev_warn(&pdev->dev, "kzalloc fail\n");
return -ENOMEM;
}
- host->io_base = devm_request_and_ioremap(&pdev->dev, res);
- if (!host->io_base) {
- dev_warn(&pdev->dev, "ioremap failed\n");
- return -ENOMEM;
- }
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ host->io_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(host->io_base))
+ return PTR_ERR(host->io_base);
host->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(host->clk))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH V3 12/15] ASoC: spear: Convert to use devm_ioremap_resource
2013-06-17 10:40 ` [PATCH V3 " Tushar Behera
@ 2013-06-17 16:20 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2013-06-17 16:20 UTC (permalink / raw)
To: Tushar Behera
Cc: alsa-devel, patches, sachin.kamat, Liam Girdwood, linux-kernel,
thierry.reding
[-- Attachment #1.1: Type: text/plain, Size: 247 bytes --]
On Mon, Jun 17, 2013 at 04:10:57PM +0530, Tushar Behera wrote:
> Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
> introduced devm_ioremap_resource() and deprecated the use of
> devm_request_and_ioremap().
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-17 16:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-10 11:34 [PATCH 00/15] Convert to use devm_ioremap_resource Tushar Behera
2013-06-10 11:35 ` [PATCH 12/15] ASoC: spear: " Tushar Behera
2013-06-10 12:06 ` Sachin Kamat
2013-06-11 3:51 ` Tushar Behera
2013-06-17 9:13 ` [PATCH V2 " Tushar Behera
2013-06-17 10:20 ` Mark Brown
2013-06-17 10:40 ` [PATCH V3 " Tushar Behera
2013-06-17 16:20 ` Mark Brown
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).