From: Alex Elder Date: Mon, 20 Oct 2014 15:27:58 +0000 (-0500) Subject: greybus: remove cports and strings from gb_module X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ff5e00a176878c218c2b27e4437e6af8f46a28c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git greybus: remove cports and strings from gb_module We no longer keep copies of strings found in the manifuest in a module's strings array, so we can get rid of the strings array. Similarly, the new manifest parsing code sets up connections for each cport id advertised for a module, so the cport array is no longer needed either. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 0a37b95d226b..b59dee171446 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -118,10 +118,7 @@ EXPORT_SYMBOL_GPL(greybus_deregister); static void greybus_module_release(struct device *dev) { struct gb_module *gmod = to_gb_module(dev); - int i; - for (i = 0; i < gmod->num_strings; ++i) - kfree(gmod->string[i]); kfree(gmod); } diff --git a/drivers/staging/greybus/module.h b/drivers/staging/greybus/module.h index e32135f3b738..2c6707d6d85f 100644 --- a/drivers/staging/greybus/module.h +++ b/drivers/staging/greybus/module.h @@ -28,11 +28,6 @@ struct gb_module { char *product_string; u64 unique_id; - int num_cports; - int num_strings; - u16 cport_ids[MAX_CPORTS_PER_MODULE]; - struct gmod_string *string[MAX_STRINGS_PER_MODULE]; - struct greybus_host_device *hd; struct gb_tty *gb_tty;