Commit 92cc1d22 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent f7d3ad98
......@@ -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)
{
/*
......
......@@ -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);
......
......@@ -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);
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment