linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC] device.h: add device_set_platdata routine
@ 2011-03-01  4:33 Viresh Kumar
  2011-03-01  7:59 ` Uwe Kleine-König
  0 siblings, 1 reply; 32+ messages in thread
From: Viresh Kumar @ 2011-03-01  4:33 UTC (permalink / raw)
  To: linux-arm-kernel

device.h supports device_get_platdata but doesn't support device_set_platdata.
This routine is required by platforms in which device structure is declared
in a machine specific file and platform data comes from board specific file.

This will be used by SPEAr patches sent in separate patch series.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 include/linux/device.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index 1bf5cf0..6ce0f20 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -576,6 +576,11 @@ static inline void *dev_get_platdata(const struct device *dev)
 	return dev->platform_data;
 }
 
+static inline void dev_set_platdata(struct device *dev, void *platdata)
+{
+	dev->platform_data = platdata;
+}
+
 /*
  * Manual binding of a device to driver. See drivers/base/bus.c
  * for information on use.
-- 
1.7.2.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2011-04-29  9:16 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01  4:33 [RFC] device.h: add device_set_platdata routine Viresh Kumar
2011-03-01  7:59 ` Uwe Kleine-König
2011-03-01  8:27   ` viresh kumar
2011-03-01  9:05     ` Uwe Kleine-König
2011-03-01  9:13       ` viresh kumar
2011-03-01 15:34   ` Greg KH
2011-04-06  9:24     ` [PATCH 1/5] driver core/platform_device_add_data: set platform_data to NULL if !data Uwe Kleine-König
2011-04-11 18:50       ` Uwe Kleine-König
2011-04-11 19:07         ` Greg KH
2011-04-06  9:24     ` [PATCH 2/5] driver core/platform_device_add_data: free platform data before overwriting Uwe Kleine-König
2011-04-06  9:24     ` [PATCH 3/5] driver core/platform_device_add_resources: set resource to NULL if !res Uwe Kleine-König
2011-04-06  9:24     ` [PATCH 4/5] driver core/platform_device_add_resources: free resource before overwriting Uwe Kleine-König
2011-04-06  9:24     ` [PATCH 5/5] driver core: let dev_set_drvdata return int instead of void as it can fail Uwe Kleine-König
2011-04-06  9:36       ` Michał Mirosław
2011-04-06 11:06         ` Uwe Kleine-König
2011-04-06 11:25           ` Michał Mirosław
2011-04-11 18:42             ` [PATCH v2] " Uwe Kleine-König
2011-04-19 23:58               ` Greg KH
2011-04-20  7:42                 ` Uwe Kleine-König
2011-04-20  7:44                   ` [PATCH v2 1/5] driver core/platform_device_add_data: set platform_data to NULL if !data Uwe Kleine-König
2011-04-20  7:44                     ` [PATCH v2 2/5] driver core/platform_device_add_data: free platform data before overwriting Uwe Kleine-König
2011-04-20  7:44                     ` [PATCH v2 3/5] driver core/platform_device_add_resources: set resource to NULL if !res Uwe Kleine-König
2011-04-20  7:44                     ` [PATCH v2 4/5] driver core/platform_device_add_resources: free resource before overwriting Uwe Kleine-König
2011-04-20  7:44                     ` [PATCH v2 5/5] driver core: let dev_set_drvdata return int instead of void as it can fail Uwe Kleine-König
2011-04-29  8:12                       ` Russell King - ARM Linux
2011-04-29  9:16                         ` Uwe Kleine-König
2011-04-20 16:17                   ` [PATCH v2] " Greg KH
2011-04-20  9:09                 ` Michał Mirosław
2011-04-20 16:15                   ` Greg KH
2011-04-20 17:59                     ` Michał Mirosław
2011-04-06 10:10       ` [PATCH 5/5] " viresh kumar
2011-04-06 11:41       ` Michał Mirosław

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).