greybus: endo: move greybus_endo_setup() to endo.c
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 21 Oct 2015 10:12:44 +0000 (15:42 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 21 Oct 2015 23:24:31 +0000 (16:24 -0700)
It belongs to the endo layer and should be placed in endo.c instead. Do
it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/core.c
drivers/staging/greybus/endo.c
drivers/staging/greybus/endo.h
drivers/staging/greybus/greybus.h

index 5e1c755..be75456 100644 (file)
@@ -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)
 {
        /*
index 37d2dec..726b1d3 100644 (file)
@@ -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);
index 3622428..0b5384d 100644 (file)
@@ -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);
 
index ae59756..524a412 100644 (file)
@@ -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 {