aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2012-11-27 19:29:04 -0800
committerArve Hjønnevåg <arve@android.com>2013-04-29 14:52:30 -0700
commitc275f8de7b53514537c199847c5d7b1f9834de72 (patch)
treec25a7cf9f1e9b54d5dc9219e1df8506a128c9797
parentc73646f95fb13b99a771ca5141d6b0993ca6dac3 (diff)
downloadvexpress-lsk-c275f8de7b53514537c199847c5d7b1f9834de72.tar.gz
usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.8
Signed-off-by: Arve Hjønnevåg <arve@android.com>
-rw-r--r--drivers/usb/gadget/android.c16
-rw-r--r--drivers/usb/gadget/f_accessory.c2
-rw-r--r--drivers/usb/gadget/f_adb.c2
-rw-r--r--drivers/usb/gadget/f_audio_source.c2
-rw-r--r--drivers/usb/gadget/f_mtp.c4
5 files changed, 10 insertions, 16 deletions
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index 4e73bf1a0f3..23b5c46eadf 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -367,11 +367,14 @@ static void functionfs_closed_callback(struct ffs_data *ffs)
mutex_unlock(&dev->mutex);
}
-static int functionfs_check_dev_callback(const char *dev_name)
+static void *functionfs_acquire_dev_callback(const char *dev_name)
{
return 0;
}
+static void functionfs_release_dev_callback(struct ffs_data *ffs_data)
+{
+}
struct adb_data {
bool opened;
@@ -1361,7 +1364,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
@@ -1399,15 +1402,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;
diff --git a/drivers/usb/gadget/f_accessory.c b/drivers/usb/gadget/f_accessory.c
index a244265c114..092964c2b50 100644
--- a/drivers/usb/gadget/f_accessory.c
+++ b/drivers/usb/gadget/f_accessory.c
@@ -1121,7 +1121,7 @@ static int acc_bind_config(struct usb_configuration *c)
dev->cdev = c->cdev;
dev->function.name = "accessory";
dev->function.strings = acc_strings,
- dev->function.descriptors = fs_acc_descs;
+ dev->function.fs_descriptors = fs_acc_descs;
dev->function.hs_descriptors = hs_acc_descs;
dev->function.bind = acc_function_bind;
dev->function.unbind = acc_function_unbind;
diff --git a/drivers/usb/gadget/f_adb.c b/drivers/usb/gadget/f_adb.c
index 1629ffb5b97..a1d70d27695 100644
--- a/drivers/usb/gadget/f_adb.c
+++ b/drivers/usb/gadget/f_adb.c
@@ -566,7 +566,7 @@ static int adb_bind_config(struct usb_configuration *c)
dev->cdev = c->cdev;
dev->function.name = "adb";
- dev->function.descriptors = fs_adb_descs;
+ dev->function.fs_descriptors = fs_adb_descs;
dev->function.hs_descriptors = hs_adb_descs;
dev->function.bind = adb_function_bind;
dev->function.unbind = adb_function_unbind;
diff --git a/drivers/usb/gadget/f_audio_source.c b/drivers/usb/gadget/f_audio_source.c
index c757409edf9..56dcf217cfe 100644
--- a/drivers/usb/gadget/f_audio_source.c
+++ b/drivers/usb/gadget/f_audio_source.c
@@ -599,7 +599,7 @@ audio_bind(struct usb_configuration *c, struct usb_function *f)
hs_as_in_ep_desc.bEndpointAddress =
fs_as_in_ep_desc.bEndpointAddress;
- f->descriptors = fs_audio_desc;
+ f->fs_descriptors = fs_audio_desc;
f->hs_descriptors = hs_audio_desc;
for (i = 0, status = 0; i < IN_EP_REQ_COUNT && status == 0; i++) {
diff --git a/drivers/usb/gadget/f_mtp.c b/drivers/usb/gadget/f_mtp.c
index 1638977a541..9ab94697c19 100644
--- a/drivers/usb/gadget/f_mtp.c
+++ b/drivers/usb/gadget/f_mtp.c
@@ -1212,10 +1212,10 @@ static int mtp_bind_config(struct usb_configuration *c, bool ptp_config)
dev->function.name = "mtp";
dev->function.strings = mtp_strings;
if (ptp_config) {
- dev->function.descriptors = fs_ptp_descs;
+ dev->function.fs_descriptors = fs_ptp_descs;
dev->function.hs_descriptors = hs_ptp_descs;
} else {
- dev->function.descriptors = fs_mtp_descs;
+ dev->function.fs_descriptors = fs_mtp_descs;
dev->function.hs_descriptors = hs_mtp_descs;
}
dev->function.bind = mtp_function_bind;