C2port:Fix deprecated exported interfaces c2port.h
PATCH 1/1 C2port:Fix deprecated exported interfaces c2port.h
From: Wanlong Gao <[email protected]>
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.
--- include/linux/c2port.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/c2port.h +2 -2
@@ -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);
Signature · 1 line
1.7.4.1
Quoted 10 lines · Wanlong Gao
From: Wanlong Gao <[email protected]>
Change
to_class_devtoto_devicesince the structclass_devicehad merged to struct device.
Fix theto_c2port_deviceinterface since the structc2port_devicehas no member named class.Signed-off-by Wanlong Gao <[email protected]>--- include/linux/c2port.h | 4 ++--
I don't know why you sent this to me, have you looked at the scripts/get_maintainer.pl tool?
Quoted 7 lines
1 files changed, 2 insertions(+), 2 deletions(-)include/linux/c2port.h +0
-0
include/linux/c2port.h struct c2port_ops { · line 64
Quoted 7 lines
include/linux/c2port.h +2
-2@@ -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)
Doesn't this break the build? If not, something is really wrong here.
confused,
greg k-h
on 2011-05-05 07:10 -0700,Greg KH wroted:
Quoted 8 lines · Wanlong Gao
Quoted 7 lines
From: Wanlong Gao <[email protected]>
Change
to_class_devtoto_devicesince the structclass_devicehad merged to struct device.
Fix theto_c2port_deviceinterface since the structc2port_devicehas no member named class.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Wanlong Gao <[email protected]>--- include/linux/c2port.h | 4 ++--I don't know why you sent this to me, have you looked at the
scripts/get_maintainer.pltool?
Yes, I have, but I just get the linux-kernel open list, so I have no idea but send it to you.
Quoted 12 lines
Quoted 12 lines
1 files changed, 2 insertions(+), 2 deletions(-)include/linux/c2port.h +0
-0@@ -60,8 +60,8 @@ struct c2port_ops {* Exported functions */
Quoted 6 lines
include/linux/c2port.h struct c2port_ops { · line 64
Quoted 4 lines
include/linux/c2port.h +2
-2-#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)Doesn't this break the build? If not, something is really wrong here.
The interface just exported but not used in the kernel code, so it will not break the build. The class_device structure is deprecated in your driver-core, so it really has something wrong here.
Quoted 2 lines
confused,
Me too, I checked the log and see that the to_c2port_device had something wrong in this file's initial version.
Quoted 2 lines
greg k-h
Thanks
Best regards
Wanlong Gao
Quoted 9 lines · Wanlong Gao
on 2011-05-05 07:10 -0700,Greg KH wroted:
Quoted 8 lines · Wanlong Gao
Quoted 7 lines
From: Wanlong Gao <[email protected]>
Change
to_class_devtoto_devicesince the structclass_devicehad merged to struct device.
Fix theto_c2port_deviceinterface since the structc2port_devicehas no member named class.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Signed-off-by Wanlong Gao <[email protected]>--- include/linux/c2port.h | 4 ++--I don't know why you sent this to me, have you looked at the
scripts/get_maintainer.pltool?Yes, I have, but I just get the linux-kernel open list, so I have no idea but send it to you.
Ok, you are right that get_maintainers.pl doesn't show anything, but look at the git history, you will see that Rodolfo Giometti <[email protected]> originally added this code, so that is who you need to copy on any patch.
Quoted 16 lines
Quoted 10 lines
Quoted 10 lines
1 files changed, 2 insertions(+), 2 deletions(-)include/linux/c2port.h +0
-0@@ -60,8 +60,8 @@ struct c2port_ops {* Exported functions */ Quoted 6 lines
include/linux/c2port.h struct c2port_ops { · line 64
Quoted 4 lines
include/linux/c2port.h +2
-2-#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)Doesn't this break the build? If not, something is really wrong here.
Quoted 3 lines
The interface just exported but not used in the kernel code, so it will not break the build. The
class_devicestructure is deprecated in your driver-core, so it really has something wrong here.
What is wrong is that these macros are never used, otherwise they would break the build. So I'm pretty sure you can just remove them safely, but run it by Rodolfo first please.
thanks,
greg k-h
on 2011-05-05四的 07:39 -0700,Greg KH wroted :
Quoted 16 lines · Wanlong Gao
Quoted 15 lines
on 2011-05-05 07:10 -0700,Greg KH wroted:
Quoted 14 lines · Wanlong Gao
Quoted 10 lines
From: Wanlong Gao <[email protected]>
Change
to_class_devtoto_devicesince the structclass_devicehad merged to struct device.
Fix theto_c2port_deviceinterface since the structc2port_devicehas no member named class.Signed-off-by Wanlong Gao <[email protected]>--- include/linux/c2port.h | 4 ++--I don't know why you sent this to me, have you looked at the
scripts/get_maintainer.pltool?
Quoted 7 lines
Quoted 2 lines
Yes, I have, but I just get the linux-kernel open list, so I have no idea but send it to you.
Ok, you are right that get_maintainers.pl doesn't show anything, but look at the git history, you will see that Rodolfo Giometti <[email protected]> originally added this code, so that is who you need to copy on any patch.
I see, I see, thank you very much.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 8 lines
1 files changed, 2 insertions(+), 2 deletions(-)include/linux/c2port.h +0
-0include/linux/c2port.h struct c2port_ops { · line 64
Quoted 7 lines
include/linux/c2port.h +2
-2@@ -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)Doesn't this break the build? If not, something is really wrong here.
Quoted 7 lines
Quoted 3 lines
The interface just exported but not used in the kernel code, so it will not break the build. The
class_devicestructure is deprecated in your driver-core, so it really has something wrong here.What is wrong is that these macros are never used, otherwise they would break the build. So I'm pretty sure you can just remove them safely, but run it by Rodolfo first please.
Thanks a lot for your tips, I'll just remove it.
Quoted 4 lines
thanks,
greg k-h
Best regards
Wanlong Gao