aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-06-10 15:23:11 -0700
committerKevin Hilman <khilman@linaro.org>2015-06-10 15:23:11 -0700
commit2528dbd348dd541e090594b7aac3f62351078388 (patch)
treea2ddf8323359b85d4be7de3ba498d7ec18e6e3f3 /drivers/usb
parentd109c1ac070c962c4332015d06a008345a44a02c (diff)
parent17b3b28baf84999421d56dce68c4b1c1ec7f1ef3 (diff)
Merge branch 'linaro-android-3.14-lsk' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-v3.14-androidlsk-v3.14-15.06-android
* 'linaro-android-3.14-lsk' of git://android.git.linaro.org/kernel/linaro-android: fix: align closely to AOSP. sched: cpufreq: update power usage only if cpufreq_stat is enabled uid_cputime: Extends the cputime functionality to report power per uid sched: cpufreq: Adds a field cpu_power in the task_struct cpufreq_stats: Adds the fucntionality to load current values for each frequency for all the cores. New Build Breakage in branch: kernel-m-dev-tegra-flounder-3.10 @ 1960706 net/unix: sk_socket can disappear when state is unlocked selinux: enable genfscon labeling for sysfs and pstore files ext4: don't save the error information if the block device is read-only selinux: enable per-file labeling for debugfs files. cpufreq: interactive: Rearm governor timer at max freq cpufreq: interactive: Implement cluster-based min_sample_time cpufreq: interactive: Exercise hispeed settings at a policy level suspend: Return error when pending wakeup source is found. proc: uid_cputime: fix show_uid_stat permission nf: IDLETIMER: Fix broken uid field in the msg
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_accessory.c3
-rw-r--r--drivers/usb/gadget/u_ether.c22
2 files changed, 12 insertions, 13 deletions
diff --git a/drivers/usb/gadget/f_accessory.c b/drivers/usb/gadget/f_accessory.c
index dcedeb4b2fef..0237f1e059b4 100644
--- a/drivers/usb/gadget/f_accessory.c
+++ b/drivers/usb/gadget/f_accessory.c
@@ -1204,8 +1204,7 @@ err:
static void acc_disconnect(void)
{
/* unregister all HID devices if USB is disconnected */
- if (_acc_dev)
- kill_all_hid_devices(_acc_dev);
+ kill_all_hid_devices(_acc_dev);
}
static void acc_cleanup(void)
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index bf6589eb7cb5..28b291a4e0e5 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -875,17 +875,6 @@ static int get_ether_addr(const char *str, u8 *dev_addr)
return 1;
}
-static int get_host_ether_addr(u8 *str, u8 *dev_addr)
-{
- memcpy(dev_addr, str, ETH_ALEN);
- if (is_valid_ether_addr(dev_addr))
- return 0;
-
- random_ether_addr(dev_addr);
- memcpy(str, dev_addr, ETH_ALEN);
- return 1;
-}
-
static int get_ether_addr_str(u8 dev_addr[ETH_ALEN], char *str, int len)
{
if (len < 18)
@@ -897,6 +886,17 @@ static int get_ether_addr_str(u8 dev_addr[ETH_ALEN], char *str, int len)
return 18;
}
+static int get_host_ether_addr(u8 *str, u8 *dev_addr)
+{
+ memcpy(dev_addr, str, ETH_ALEN);
+ if (is_valid_ether_addr(dev_addr))
+ return 0;
+
+ random_ether_addr(dev_addr);
+ memcpy(str, dev_addr, ETH_ALEN);
+ return 1;
+}
+
static const struct net_device_ops eth_netdev_ops = {
.ndo_open = eth_open,
.ndo_stop = eth_stop,