lkml.org 
[lkml]   [2011]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] C2port:Fix deprecated exported interfaces c2port.h
Date
From: Wanlong Gao <wanlong.gao@gmail.com>

Change to_class_dev to to_device since the struct class_device had
merged to struct device.
Fix the to_c2port_device interface since the struct c2port_device
has no member named class.

Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
---
include/linux/c2port.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/c2port.h b/include/linux/c2port.h
index 2a5cd86..7e6bd33 100644
--- a/include/linux/c2port.h
+++ b/include/linux/c2port.h
@@ -60,8 +60,8 @@ struct c2port_ops {
* Exported functions
*/

-#define to_class_dev(obj) container_of((obj), struct class_device, kobj)
-#define to_c2port_device(obj) container_of((obj), struct c2port_device, class)
+#define to_device(obj) container_of(obj, struct device, kobj)
+#define to_c2port_device(obj) container_of(obj, struct c2port_device, dev.kobj)

extern struct c2port_device *c2port_device_register(char *name,
struct c2port_ops *ops, void *devdata);
--
1.7.4.1


\
 
 \ /
  Last update: 2011-05-05 14:33    [W:0.057 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site