From: Alex Elder Date: Thu, 6 Nov 2014 13:01:00 +0000 (-0600) Subject: greybus: kill old cport handler code X-Git-Tag: v4.14-rc1~2366^2~378^2~21^2~1930 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a0eed065ded836bbb6b71da965cef0d6a0aeecf;p=platform%2Fkernel%2Flinux-rpi.git greybus: kill old cport handler code Handling of incoming requests has been moved into the Greybus connection and protocol layers. As a result, the original cport oriented handler code is no longer used. So get rid of it. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/gbuf.c b/drivers/staging/greybus/gbuf.c index 4f591aa..17141b6 100644 --- a/drivers/staging/greybus/gbuf.c +++ b/drivers/staging/greybus/gbuf.c @@ -114,37 +114,6 @@ void greybus_kill_gbuf(struct gbuf *gbuf) hd->driver->kill_gbuf(gbuf); } -#define MAX_CPORTS 1024 -struct gb_cport_handler { - gbuf_complete_t handler; - u16 cport_id; - struct gb_module *gmod; - void *context; -}; - -static struct gb_cport_handler cport_handler[MAX_CPORTS]; -// FIXME - use a lock for this list of handlers, but really, for now we don't -// need it, we don't have a dynamic system... - -int gb_register_cport_complete(struct gb_module *gmod, - gbuf_complete_t handler, - u16 cport_id, - void *context) -{ - if (cport_handler[cport_id].handler) - return -EINVAL; - cport_handler[cport_id].context = context; - cport_handler[cport_id].gmod = gmod; - cport_handler[cport_id].cport_id = cport_id; - cport_handler[cport_id].handler = handler; - return 0; -} - -void gb_deregister_cport_complete(u16 cport_id) -{ - cport_handler[cport_id].handler = NULL; -} - void greybus_cport_in(struct greybus_host_device *hd, u16 cport_id, u8 *data, size_t length) { diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h index f6c90e0..834cbaa 100644 --- a/drivers/staging/greybus/greybus.h +++ b/drivers/staging/greybus/greybus.h @@ -258,11 +258,6 @@ void gb_debugfs_cleanup(void); int gb_gbuf_init(void); void gb_gbuf_exit(void); -int gb_register_cport_complete(struct gb_module *gmod, - gbuf_complete_t handler, u16 cport_id, - void *context); -void gb_deregister_cport_complete(u16 cport_id); - extern struct bus_type greybus_bus_type; extern const struct attribute_group *greybus_module_groups[];