* [PATCH] spi: omap-uwire: use devm_ functions
@ 2014-06-20 20:38 Himangi Saraogi
2014-06-21 20:54 ` Mark Brown
2014-06-27 6:07 ` [PATCH] spi: omap-uwire: fix compilation failure Olof Johansson
0 siblings, 2 replies; 5+ messages in thread
From: Himangi Saraogi @ 2014-06-20 20:38 UTC (permalink / raw)
To: Mark Brown, linux-spi, linux-kernel; +Cc: julia.lawall
This patch introduces the use of devm_clk_get and devm_ioremap instead
of the unmanaged interfaces and removes the corresponding free function
calls.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
---
drivers/spi/spi-omap-uwire.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c
index 0f5a0aa..cbf67f9 100644
--- a/drivers/spi/spi-omap-uwire.c
+++ b/drivers/spi/spi-omap-uwire.c
@@ -447,7 +447,6 @@ static void uwire_off(struct uwire_spi *uwire)
{
uwire_write_reg(UWIRE_SR3, 0);
clk_disable(uwire->ck);
- clk_put(uwire->ck);
spi_master_put(uwire->bitbang.master);
}
@@ -463,7 +462,7 @@ static int uwire_probe(struct platform_device *pdev)
uwire = spi_master_get_devdata(master);
- uwire_base = ioremap(UWIRE_BASE_PHYS, UWIRE_IO_SIZE);
+ uwire_base = devm_ioremap(&pdev->dev, UWIRE_BASE_PHYS, UWIRE_IO_SIZE);
if (!uwire_base) {
dev_dbg(&pdev->dev, "can't ioremap UWIRE\n");
spi_master_put(master);
@@ -472,12 +471,11 @@ static int uwire_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, uwire);
- uwire->ck = clk_get(&pdev->dev, "fck");
+ uwire->ck = devm_clk_get(&pdev->dev, "fck");
if (IS_ERR(uwire->ck)) {
status = PTR_ERR(uwire->ck);
dev_dbg(&pdev->dev, "no functional clock?\n");
spi_master_put(master);
- iounmap(uwire_base);
return status;
}
clk_enable(uwire->ck);
@@ -507,7 +505,6 @@ static int uwire_probe(struct platform_device *pdev)
status = spi_bitbang_start(&uwire->bitbang);
if (status < 0) {
uwire_off(uwire);
- iounmap(uwire_base);
}
return status;
}
@@ -520,7 +517,6 @@ static int uwire_remove(struct platform_device *pdev)
spi_bitbang_stop(&uwire->bitbang);
uwire_off(uwire);
- iounmap(uwire_base);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: omap-uwire: use devm_ functions
2014-06-20 20:38 [PATCH] spi: omap-uwire: use devm_ functions Himangi Saraogi
@ 2014-06-21 20:54 ` Mark Brown
2014-06-27 6:07 ` [PATCH] spi: omap-uwire: fix compilation failure Olof Johansson
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-06-21 20:54 UTC (permalink / raw)
To: Himangi Saraogi
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, julia.lawall-L2FTfq7BK8M
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
On Sat, Jun 21, 2014 at 02:08:58AM +0530, Himangi Saraogi wrote:
> This patch introduces the use of devm_clk_get and devm_ioremap instead
> of the unmanaged interfaces and removes the corresponding free function
> calls.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] spi: omap-uwire: fix compilation failure
2014-06-20 20:38 [PATCH] spi: omap-uwire: use devm_ functions Himangi Saraogi
2014-06-21 20:54 ` Mark Brown
@ 2014-06-27 6:07 ` Olof Johansson
[not found] ` <1403849258-21779-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Olof Johansson @ 2014-06-27 6:07 UTC (permalink / raw)
To: Mark Brown
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Olof Johansson,
Himangi Saraogi, Julia Lawall
Patch 'spi: omap-uwire: use devm_ functions' (b3f6a57506b8) introduced a
build error due to a missing include file. Add it.
Cc: Himangi Saraogi <himangi774-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
Signed-off-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
---
drivers/spi/spi-omap-uwire.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c
index cbf67f9..a05359c 100644
--- a/drivers/spi/spi-omap-uwire.c
+++ b/drivers/spi/spi-omap-uwire.c
@@ -38,6 +38,7 @@
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/io.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/slab.h>
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: omap-uwire: fix compilation failure
[not found] ` <1403849258-21779-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
@ 2014-06-27 9:03 ` Mark Brown
[not found] ` <20140627090303.GB23300-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2014-06-27 9:03 UTC (permalink / raw)
To: Olof Johansson
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Himangi Saraogi,
Julia Lawall
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
On Thu, Jun 26, 2014 at 11:07:38PM -0700, Olof Johansson wrote:
> Patch 'spi: omap-uwire: use devm_ functions' (b3f6a57506b8) introduced a
> build error due to a missing include file. Add it.
A similar patch was applied a few days ago.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: omap-uwire: fix compilation failure
[not found] ` <20140627090303.GB23300-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2014-06-27 16:29 ` Olof Johansson
0 siblings, 0 replies; 5+ messages in thread
From: Olof Johansson @ 2014-06-27 16:29 UTC (permalink / raw)
To: Mark Brown
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Himangi Saraogi, Julia Lawall
On Fri, Jun 27, 2014 at 2:03 AM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Thu, Jun 26, 2014 at 11:07:38PM -0700, Olof Johansson wrote:
>> Patch 'spi: omap-uwire: use devm_ functions' (b3f6a57506b8) introduced a
>> build error due to a missing include file. Add it.
>
> A similar patch was applied a few days ago.
Ah, cool. I've seen the build breakage a couple of days including last
night's next and I didn't notice a patch for it based on a quick
search.
http://arm-soc.lixom.net/buildlogs/next/next-20140627/buildall.arm.omap1_defconfig.log.failed
http://arm-soc.lixom.net/buildlogs/next/next-20140626/buildall.arm.omap1_defconfig.log.failed
-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-27 16:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 20:38 [PATCH] spi: omap-uwire: use devm_ functions Himangi Saraogi
2014-06-21 20:54 ` Mark Brown
2014-06-27 6:07 ` [PATCH] spi: omap-uwire: fix compilation failure Olof Johansson
[not found] ` <1403849258-21779-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2014-06-27 9:03 ` Mark Brown
[not found] ` <20140627090303.GB23300-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-06-27 16:29 ` Olof Johansson
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).