From 92cc1d225282592b19a91604cc23a99013d22802 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Wed, 21 Oct 2015 15:42:44 +0530 Subject: [PATCH] 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 --- drivers/staging/greybus/core.c | 14 -------------- drivers/staging/greybus/endo.c | 14 ++++++++++++++ drivers/staging/greybus/endo.h | 2 ++ drivers/staging/greybus/greybus.h | 2 -- 4 files changed, 16 insertions(+), 16 deletions(-) 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 ae59756..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 { -- 2.7.4