Following patches are required on android-3.7 branch for the androidized kernel for Origen to build.
Needs testing on USB gadget functionalities.
Tushar Behera (3): usb: gadget: android: Fix build error because of removal of usb_gadget_controller_number usb: gadget: android: Fix build error because of change in composite driver framework netfilter: xt_quota2: Remove extra parameter from netlink_kernel_create
drivers/usb/gadget/android.c | 18 +++++------------- drivers/usb/gadget/composite.c | 5 ++++- net/netfilter/xt_quota2.c | 5 +++-- 3 files changed, 12 insertions(+), 16 deletions(-)
Required as per commit ed9cbda ("usb: gadget: remove usb_gadget_controller_number()").
Signed-off-by: Tushar Behera tushar.behera@linaro.org --- drivers/usb/gadget/android.c | 11 +---------- 1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c index d2c3393..c26d7be 100644 --- a/drivers/usb/gadget/android.c +++ b/drivers/usb/gadget/android.c @@ -1118,7 +1118,7 @@ static int android_bind(struct usb_composite_dev *cdev) { struct android_dev *dev = _android_dev; struct usb_gadget *gadget = cdev->gadget; - int gcnum, id, ret; + int id, ret;
/* * Start disconnected. Userspace will connect the gadget once @@ -1156,15 +1156,6 @@ static int android_bind(struct usb_composite_dev *cdev) strings_dev[STRING_SERIAL_IDX].id = id; device_desc.iSerialNumber = id;
- gcnum = usb_gadget_controller_number(gadget); - if (gcnum >= 0) - device_desc.bcdDevice = cpu_to_le16(0x0200 + gcnum); - else { - pr_warning("%s: controller '%s' not recognized\n", - longname, gadget->name); - device_desc.bcdDevice = __constant_cpu_to_le16(0x9999); - } - usb_gadget_set_selfpowered(gadget); dev->cdev = cdev;
On 11/15/2012 01:17 AM, Tushar Behera wrote:
Required as per commit ed9cbda ("usb: gadget: remove usb_gadget_controller_number()").
Signed-off-by: Tushar Behera tushar.behera@linaro.org
Thanks! Merged into linaro-android-3.7-anton-rebase. -john
Signed-off-by: Tushar Behera tushar.behera@linaro.org --- drivers/usb/gadget/android.c | 7 ++++--- drivers/usb/gadget/composite.c | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c index c26d7be..2b11055 100644 --- a/drivers/usb/gadget/android.c +++ b/drivers/usb/gadget/android.c @@ -1175,6 +1175,7 @@ static struct usb_composite_driver android_usb_driver = { .name = "android_usb", .dev = &device_desc, .strings = dev_strings, + .bind = android_bind, .unbind = android_usb_unbind, .max_speed = USB_SPEED_HIGH, }; @@ -1291,10 +1292,10 @@ static int __init init(void) _android_dev = dev;
/* Override composite driver functions */ - composite_driver.setup = android_setup; - composite_driver.disconnect = android_disconnect; + composite_driver_template.setup = android_setup; + composite_driver_template.disconnect = android_disconnect;
- return usb_composite_probe(&android_usb_driver, android_bind); + return usb_composite_probe(&android_usb_driver); } module_init(init);
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 957f973..c4460a5 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1528,8 +1528,11 @@ composite_resume(struct usb_gadget *gadget) }
/*-------------------------------------------------------------------------*/ - +#if IS_ENABLED(CONFIG_USB_G_ANDROID) +static struct usb_gadget_driver composite_driver_template = { +#else static const struct usb_gadget_driver composite_driver_template = { +#endif .bind = composite_bind, .unbind = composite_unbind,
On 11/15/2012 01:17 AM, Tushar Behera wrote:
Signed-off-by: Tushar Behera tushar.behera@linaro.org
Thanks! Merged into linaro-android-3.7-anton-rebase. -john
Required as per commit 9f00d9776bc5 ("netlink: hide struct module parameter in netlink_kernel_create").
Signed-off-by: Tushar Behera tushar.behera@linaro.org --- net/netfilter/xt_quota2.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/xt_quota2.c b/net/netfilter/xt_quota2.c index 3a9c1f9..8163f37 100644 --- a/net/netfilter/xt_quota2.c +++ b/net/netfilter/xt_quota2.c @@ -350,14 +350,15 @@ static struct xt_match quota_mt2_reg[] __read_mostly = { static int __init quota_mt2_init(void) { int ret; +#ifdef CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG struct netlink_kernel_cfg cfg = { .groups = 1, }; +#endif pr_debug("xt_quota2: init()");
#ifdef CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG - nflognl = netlink_kernel_create(&init_net, NETLINK_NFLOG, - THIS_MODULE, &cfg); + nflognl = netlink_kernel_create(&init_net, NETLINK_NFLOG, &cfg); if (!nflognl) return -ENOMEM; #endif
On 11/15/2012 01:17 AM, Tushar Behera wrote:
Required as per commit 9f00d9776bc5 ("netlink: hide struct module parameter in netlink_kernel_create").
Signed-off-by: Tushar Behera tushar.behera@linaro.org
Thanks! Merged into linaro-android-3.7-anton-rebase. -john
rb_init_node() has been removed from the kernel, use alternate macro.
Signed-off-by: Tushar Behera tushar.behera@linaro.org ---
This patch also needs to go into android-3.7 tree.
drivers/gpu/ion/ion.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c index 1002ec0..baab410 100644 --- a/drivers/gpu/ion/ion.c +++ b/drivers/gpu/ion/ion.c @@ -191,7 +191,7 @@ static struct ion_handle *ion_handle_create(struct ion_client *client, if (!handle) return ERR_PTR(-ENOMEM); kref_init(&handle->ref); - rb_init_node(&handle->node); + RB_CLEAR_NODE(&handle->node); handle->client = client; ion_buffer_get(buffer); handle->buffer = buffer;
On 11/15/2012 02:02 AM, Tushar Behera wrote:
rb_init_node() has been removed from the kernel, use alternate macro.
Signed-off-by: Tushar Behera tushar.behera@linaro.org
This patch also needs to go into android-3.7 tree.
Thanks for this. Sorry it took me so long, but I've just now merged this into the linaro-android-3.7-anton-rebase branch
thanks -john