From: Viresh Kumar Date: Wed, 21 Oct 2015 10:12:44 +0000 (+0530) Subject: greybus: endo: move greybus_endo_setup() to endo.c X-Git-Tag: v4.14-rc1~2366^2~378^2~21^2~1094 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92cc1d225282592b19a91604cc23a99013d22802;p=platform%2Fkernel%2Flinux-rpi.git greybus: endo: move greybus_endo_setup() to endo.c It belongs to the endo layer and should be placed in endo.c instead. Do it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 5e1c755..be75456 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -228,20 +228,6 @@ struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *driver } EXPORT_SYMBOL_GPL(greybus_create_hd); -int greybus_endo_setup(struct greybus_host_device *hd, u16 endo_id, - u8 ap_intf_id) -{ - struct gb_endo *endo; - - endo = gb_endo_create(hd, endo_id, ap_intf_id); - if (IS_ERR(endo)) - return PTR_ERR(endo); - hd->endo = endo; - - return 0; -} -EXPORT_SYMBOL_GPL(greybus_endo_setup); - void greybus_remove_hd(struct greybus_host_device *hd) { /* diff --git a/drivers/staging/greybus/endo.c b/drivers/staging/greybus/endo.c index 37d2dec..726b1d3 100644 --- a/drivers/staging/greybus/endo.c +++ b/drivers/staging/greybus/endo.c @@ -524,6 +524,20 @@ void gb_endo_remove(struct gb_endo *endo) device_unregister(&endo->dev); } +int greybus_endo_setup(struct greybus_host_device *hd, u16 endo_id, + u8 ap_intf_id) +{ + struct gb_endo *endo; + + endo = gb_endo_create(hd, endo_id, ap_intf_id); + if (IS_ERR(endo)) + return PTR_ERR(endo); + hd->endo = endo; + + return 0; +} +EXPORT_SYMBOL_GPL(greybus_endo_setup); + int __init gb_endo_init(void) { ida_init(&greybus_endo_id_map); diff --git a/drivers/staging/greybus/endo.h b/drivers/staging/greybus/endo.h index 3622428..0b5384d 100644 --- a/drivers/staging/greybus/endo.h +++ b/drivers/staging/greybus/endo.h @@ -55,6 +55,8 @@ void gb_endo_exit(void); struct gb_endo *gb_endo_create(struct greybus_host_device *hd, u16 endo_id, u8 ap_intf_id); void gb_endo_remove(struct gb_endo *endo); +int greybus_endo_setup(struct greybus_host_device *hd, u16 endo_id, + u8 ap_intf_id); u8 endo_get_module_id(struct gb_endo *endo, u8 interface_id); diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h index ae597563..524a412 100644 --- a/drivers/staging/greybus/greybus.h +++ b/drivers/staging/greybus/greybus.h @@ -113,8 +113,6 @@ struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *hd, struct device *parent, size_t buffer_size_max, size_t num_cports); -int greybus_endo_setup(struct greybus_host_device *hd, u16 endo_id, - u8 ap_intf_id); void greybus_remove_hd(struct greybus_host_device *hd); struct greybus_driver {