aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-30 11:18:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-30 11:18:55 +0100
commitfc17aa8b63161ec92ce329edbef41ebb3490162e (patch)
tree4024d3efd115d2f5ba99f83f91d0a4ada6240456
parent824f28c9ec990b8b0c7e92ec3fd2c268ec9a17a5 (diff)
downloadpatches-fc17aa8b63161ec92ce329edbef41ebb3490162e.tar.gz
patch update and refresh
-rw-r--r--qlcnic_sysfs.patch6
-rw-r--r--usb_DEVICE_ATTR.patch40
2 files changed, 41 insertions, 5 deletions
diff --git a/qlcnic_sysfs.patch b/qlcnic_sysfs.patch
index 23c3ee88c2c285..d9ef05c4062d07 100644
--- a/qlcnic_sysfs.patch
+++ b/qlcnic_sysfs.patch
@@ -91,7 +91,7 @@
static ssize_t qlcnic_sysfs_read_crb(struct file *filp, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
-@@ -1174,24 +1175,6 @@ static ssize_t qlcnic_83xx_sysfs_flash_w
+@@ -1176,24 +1177,6 @@ static ssize_t qlcnic_83xx_sysfs_flash_w
return size;
}
@@ -116,7 +116,7 @@
static const struct bin_attribute bin_attr_crb = {
.attr = { .name = "crb", .mode = 0644 },
.size = 0,
-@@ -1317,6 +1300,24 @@ void qlcnic_unregister_hwmon_dev(struct
+@@ -1319,6 +1302,24 @@ void qlcnic_unregister_hwmon_dev(struct
}
#endif
@@ -141,7 +141,7 @@
void qlcnic_create_sysfs_entries(struct qlcnic_adapter *adapter)
{
struct device *dev = &adapter->pdev->dev;
-@@ -1330,6 +1331,11 @@ void qlcnic_create_sysfs_entries(struct
+@@ -1332,6 +1333,11 @@ void qlcnic_create_sysfs_entries(struct
void qlcnic_remove_sysfs_entries(struct qlcnic_adapter *adapter)
{
struct device *dev = &adapter->pdev->dev;
diff --git a/usb_DEVICE_ATTR.patch b/usb_DEVICE_ATTR.patch
index 275d723c70e71e..8ab716650260da 100644
--- a/usb_DEVICE_ATTR.patch
+++ b/usb_DEVICE_ATTR.patch
@@ -1,11 +1,25 @@
+From foo@baz Fri Nov 30 11:15:46 CET 2018
+Date: Fri, 30 Nov 2018 11:15:46 +0100
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] USB: get rid of DEVICE_ATTR() usage
+
+Drivers should be using DEVICE_ATTR_RO() and friends, not a "raw"
+DEVICE_ATTR(). Convert the remaining drivers/usb/ code to use a
+specific DEVICE_ATTR_* macro instead, making it easier to audit the
+correct mode on sysfs files and to make it harder to get wrong in the
+future.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/gadget/function/f_mass_storage.c | 5 -
+ drivers/usb/phy/phy-fsl-usb.c | 6 -
drivers/usb/wusbcore/cbaf.c | 82 +++++++++++----------------
- 2 files changed, 38 insertions(+), 49 deletions(-)
+ 3 files changed, 41 insertions(+), 52 deletions(-)
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
-@@ -2545,9 +2545,8 @@ static ssize_t file_store(struct device
+@@ -2544,9 +2544,8 @@ static ssize_t file_store(struct device
}
static DEVICE_ATTR_RW(nofua);
@@ -17,6 +31,28 @@
/****************************** FSG COMMON ******************************/
+--- a/drivers/usb/phy/phy-fsl-usb.c
++++ b/drivers/usb/phy/phy-fsl-usb.c
+@@ -960,8 +960,8 @@ int usb_otg_start(struct platform_device
+ /*
+ * state file in sysfs
+ */
+-static ssize_t show_fsl_usb2_otg_state(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t fsl_usb2_otg_state_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+ struct otg_fsm *fsm = &fsl_otg_dev->fsm;
+ char *next = buf;
+@@ -1041,7 +1041,7 @@ static ssize_t show_fsl_usb2_otg_state(s
+ return PAGE_SIZE - size;
+ }
+
+-static DEVICE_ATTR(fsl_usb2_otg_state, S_IRUGO, show_fsl_usb2_otg_state, NULL);
++static DEVICE_ATTR_RO(fsl_usb2_otg_state);
+
+
+ /* Char driver interface to control some OTG input */
--- a/drivers/usb/wusbcore/cbaf.c
+++ b/drivers/usb/wusbcore/cbaf.c
@@ -296,9 +296,8 @@ static int cbaf_cdid_get(struct cbaf *cb