All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: linux-omap@vger.kernel.org, Grant Likely <grant.likely@secretlab.ca>
Cc: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/9] OMAP: omap_device: _disable_idle_on_suspend() takes platform_device pointer
Date: Fri,  5 Aug 2011 17:19:23 -0700	[thread overview]
Message-ID: <1312589965-19416-8-git-send-email-khilman@ti.com> (raw)
In-Reply-To: <1312589965-19416-1-git-send-email-khilman@ti.com>

Public omap_device functions need to take platform_device pointers,
conversion to omap_device pointers is done internal to the omap_device
layer.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 arch/arm/mach-omap2/gpio.c                    |    2 +-
 arch/arm/mach-omap2/serial.c                  |    2 +-
 arch/arm/plat-omap/include/plat/omap_device.h |   13 ++++++++-----
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 76abdcb..652ccc5 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -119,7 +119,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
 		return PTR_ERR(pdev);
 	}
 
-	omap_device_disable_idle_on_suspend(od);
+	omap_device_disable_idle_on_suspend(pdev);
 
 	gpio_bank_count++;
 	return 0;
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 53b6808..3d1c1d3 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -805,7 +805,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 	WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n",
 	     name, oh->name);
 
-	omap_device_disable_idle_on_suspend(od);
+	omap_device_disable_idle_on_suspend(pdev);
 	oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
 
 	uart->irq = oh->mpu_irqs[0].irq;
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 750f401..4f98770 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -116,11 +116,6 @@ int omap_device_enable_hwmods(struct omap_device *od);
 int omap_device_disable_clocks(struct omap_device *od);
 int omap_device_enable_clocks(struct omap_device *od);
 
-static inline void omap_device_disable_idle_on_suspend(struct omap_device *od)
-{
-	od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
-}
-
 /*
  * Entries should be kept in latency order ascending
  *
@@ -153,4 +148,12 @@ struct omap_device_pm_latency {
 /* Get omap_device pointer from platform_device pointer */
 #define to_omap_device(x) container_of((x), struct omap_device, pdev)
 
+static inline
+void omap_device_disable_idle_on_suspend(struct platform_device *pdev)
+{
+	struct omap_device *od = to_omap_device(pdev);
+
+	od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
+}
+
 #endif
-- 
1.7.6


WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/9] OMAP: omap_device: _disable_idle_on_suspend() takes platform_device pointer
Date: Fri,  5 Aug 2011 17:19:23 -0700	[thread overview]
Message-ID: <1312589965-19416-8-git-send-email-khilman@ti.com> (raw)
In-Reply-To: <1312589965-19416-1-git-send-email-khilman@ti.com>

Public omap_device functions need to take platform_device pointers,
conversion to omap_device pointers is done internal to the omap_device
layer.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 arch/arm/mach-omap2/gpio.c                    |    2 +-
 arch/arm/mach-omap2/serial.c                  |    2 +-
 arch/arm/plat-omap/include/plat/omap_device.h |   13 ++++++++-----
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 76abdcb..652ccc5 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -119,7 +119,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
 		return PTR_ERR(pdev);
 	}
 
-	omap_device_disable_idle_on_suspend(od);
+	omap_device_disable_idle_on_suspend(pdev);
 
 	gpio_bank_count++;
 	return 0;
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 53b6808..3d1c1d3 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -805,7 +805,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 	WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n",
 	     name, oh->name);
 
-	omap_device_disable_idle_on_suspend(od);
+	omap_device_disable_idle_on_suspend(pdev);
 	oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
 
 	uart->irq = oh->mpu_irqs[0].irq;
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 750f401..4f98770 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -116,11 +116,6 @@ int omap_device_enable_hwmods(struct omap_device *od);
 int omap_device_disable_clocks(struct omap_device *od);
 int omap_device_enable_clocks(struct omap_device *od);
 
-static inline void omap_device_disable_idle_on_suspend(struct omap_device *od)
-{
-	od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
-}
-
 /*
  * Entries should be kept in latency order ascending
  *
@@ -153,4 +148,12 @@ struct omap_device_pm_latency {
 /* Get omap_device pointer from platform_device pointer */
 #define to_omap_device(x) container_of((x), struct omap_device, pdev)
 
+static inline
+void omap_device_disable_idle_on_suspend(struct platform_device *pdev)
+{
+	struct omap_device *od = to_omap_device(pdev);
+
+	od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
+}
+
 #endif
-- 
1.7.6

  parent reply	other threads:[~2011-08-06  0:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-06  0:19 [PATCH 0/9] OMAP: omap_device cleanups, decouple platform_device for v3.2 Kevin Hilman
2011-08-06  0:19 ` Kevin Hilman
2011-08-06  0:19 ` [PATCH 1/9] omap: mcbsp: Remove omap device API Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  0:19 ` [PATCH 2/9] OMAP: omap_device: replace debug/warning/error prints with dev_* macros Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  0:19 ` [PATCH 3/9] OMAP: omap_device: make latency autoadjust messages debug Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  0:19 ` [PATCH 4/9] OMAP: omap_device: remove internal functions from omap_device.h Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  0:19 ` [PATCH 5/9] OMAP: omap_device: when building return platform_device instead of omap_device Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  0:19 ` [PATCH 6/9] OMAP: omap_device: device register functions now take platform_device pointer Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  0:19 ` Kevin Hilman [this message]
2011-08-06  0:19   ` [PATCH 7/9] OMAP: omap_device: _disable_idle_on_suspend() takes " Kevin Hilman
2011-08-06  0:19 ` [PATCH 8/9] ARM: platform_device: pdev_archdata: add omap_device pointer Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  8:31   ` Grant Likely
2011-08-06  8:31     ` Grant Likely
2011-08-06  0:19 ` [PATCH 9/9] OMAP: omap_device: decouple platform_device from omap_device Kevin Hilman
2011-08-06  0:19   ` Kevin Hilman
2011-08-06  8:33   ` Grant Likely
2011-08-06  8:33     ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1312589965-19416-8-git-send-email-khilman@ti.com \
    --to=khilman@ti.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.