diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-23 09:21:56 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-23 09:21:56 -0800 |
| commit | 4a411fc9cd1b86d9a2ed4e3df49809258d90a1ae (patch) | |
| tree | b3ac3e260848c976b545911fa08fdd0cb3c1a3f3 /d01.patch | |
| parent | 676ce066faeb64332c10434fc255cb34aeb30f71 (diff) | |
| download | patches-4a411fc9cd1b86d9a2ed4e3df49809258d90a1ae.tar.gz | |
remove some patches already upstream and add more rtl8821ae patches
Diffstat (limited to 'd01.patch')
| -rw-r--r-- | d01.patch | 563 |
1 files changed, 23 insertions, 540 deletions
diff --git a/d01.patch b/d01.patch index d47deca4903090..db705b84391c4b 100644 --- a/d01.patch +++ b/d01.patch @@ -1,18 +1,17 @@ --- - drivers/hid/hid-core.c | 24 +- - drivers/infiniband/hw/nes/nes.c | 80 +++----- - drivers/pci/pci-driver.c | 8 - drivers/scsi/aic94xx/aic94xx_init.c | 4 - drivers/scsi/megaraid/megaraid_sas_base.c | 32 +-- - drivers/scsi/osst.c | 4 - drivers/scsi/scsi_debug.c | 270 ++++++++++++------------------ - drivers/scsi/st.c | 74 ++------ - drivers/tty/hvc/hvcs.c | 7 - 9 files changed, 190 insertions(+), 313 deletions(-) + drivers/hid/hid-core.c | 24 +++------ + drivers/infiniband/hw/nes/nes.c | 80 +++++++++++------------------- + drivers/pci/pci-driver.c | 8 +-- + drivers/scsi/aic94xx/aic94xx_init.c | 4 - + drivers/scsi/megaraid/megaraid_sas_base.c | 32 ++++-------- + drivers/scsi/osst.c | 4 - + drivers/scsi/st.c | 74 ++++++--------------------- + drivers/tty/hvc/hvcs.c | 7 +- + 8 files changed, 82 insertions(+), 151 deletions(-) --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c -@@ -1898,7 +1898,7 @@ struct hid_dynid { +@@ -1899,7 +1899,7 @@ struct hid_dynid { * Adds a new dynamic hid device ID to this driver, * and causes the driver to probe for all devices again. */ @@ -21,7 +20,7 @@ size_t count) { struct hid_driver *hdrv = container_of(drv, struct hid_driver, driver); -@@ -1930,7 +1930,13 @@ static ssize_t store_new_id(struct devic +@@ -1931,7 +1931,13 @@ static ssize_t store_new_id(struct devic return ret ? : count; } @@ -36,7 +35,7 @@ static void hid_free_dynids(struct hid_driver *hdrv) { -@@ -2090,6 +2096,7 @@ static int hid_uevent(struct device *dev +@@ -2091,6 +2097,7 @@ static int hid_uevent(struct device *dev static struct bus_type hid_bus_type = { .name = "hid", .dev_groups = hid_dev_groups, @@ -44,7 +43,7 @@ .match = hid_bus_match, .probe = hid_device_probe, .remove = hid_device_remove, -@@ -2527,8 +2534,6 @@ EXPORT_SYMBOL_GPL(hid_destroy_device); +@@ -2528,8 +2535,6 @@ EXPORT_SYMBOL_GPL(hid_destroy_device); int __hid_register_driver(struct hid_driver *hdrv, struct module *owner, const char *mod_name) { @@ -53,7 +52,7 @@ hdrv->driver.name = hdrv->name; hdrv->driver.bus = &hid_bus_type; hdrv->driver.owner = owner; -@@ -2537,21 +2542,12 @@ int __hid_register_driver(struct hid_dri +@@ -2538,21 +2543,12 @@ int __hid_register_driver(struct hid_dri INIT_LIST_HEAD(&hdrv->dyn_list); spin_lock_init(&hdrv->dyn_lock); @@ -301,7 +300,7 @@ { --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c -@@ -98,7 +98,7 @@ static void pci_free_dynids(struct pci_d +@@ -99,7 +99,7 @@ static void pci_free_dynids(struct pci_d * Allow PCI IDs to be added to an existing driver via sysfs. */ static ssize_t @@ -310,7 +309,7 @@ { struct pci_driver *pdrv = to_pci_driver(driver); const struct pci_device_id *ids = pdrv->id_table; -@@ -135,7 +135,7 @@ store_new_id(struct device_driver *drive +@@ -136,7 +136,7 @@ store_new_id(struct device_driver *drive return retval; return count; } @@ -319,7 +318,7 @@ /** * store_remove_id - remove a PCI device ID from this driver -@@ -146,7 +146,7 @@ static DRIVER_ATTR(new_id, S_IWUSR, NULL +@@ -147,7 +147,7 @@ static DRIVER_ATTR(new_id, S_IWUSR, NULL * Removes a dynamic pci device ID to this driver. */ static ssize_t @@ -328,7 +327,7 @@ { struct pci_dynid *dynid, *n; struct pci_driver *pdrv = to_pci_driver(driver); -@@ -181,7 +181,7 @@ store_remove_id(struct device_driver *dr +@@ -182,7 +182,7 @@ store_remove_id(struct device_driver *dr return retval; return count; } @@ -355,7 +354,7 @@ { --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c -@@ -5371,50 +5371,43 @@ static struct pci_driver megasas_pci_dri +@@ -5373,50 +5373,43 @@ static struct pci_driver megasas_pci_dri /* * Sysfs driver attributes */ @@ -417,7 +416,7 @@ { int retval = count; if(sscanf(buf,"%u",&megasas_dbg_lvl)<1){ -@@ -5424,8 +5417,7 @@ megasas_sysfs_set_dbg_lvl(struct device_ +@@ -5426,8 +5419,7 @@ megasas_sysfs_set_dbg_lvl(struct device_ return retval; } @@ -444,522 +443,6 @@ static int osst_create_sysfs_files(struct device_driver *sysfs) { ---- a/drivers/scsi/scsi_debug.c -+++ b/drivers/scsi/scsi_debug.c -@@ -276,10 +276,12 @@ static DEFINE_RWLOCK(atomic_rw); - static char sdebug_proc_name[] = "scsi_debug"; - - static struct bus_type pseudo_lld_bus; -+static const struct attribute_group *sdebug_drv_groups[]; - - static struct device_driver sdebug_driverfs_driver = { - .name = sdebug_proc_name, - .bus = &pseudo_lld_bus, -+ .groups = sdebug_drv_groups, - }; - - static const int check_condition_result = -@@ -2873,13 +2875,13 @@ static int scsi_debug_show_info(struct s - return 0; - } - --static ssize_t sdebug_delay_show(struct device_driver * ddp, char * buf) -+static ssize_t delay_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_delay); - } - --static ssize_t sdebug_delay_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t delay_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int delay; - char work[20]; -@@ -2892,16 +2894,15 @@ static ssize_t sdebug_delay_store(struct - } - return -EINVAL; - } --DRIVER_ATTR(delay, S_IRUGO | S_IWUSR, sdebug_delay_show, -- sdebug_delay_store); -+static DRIVER_ATTR_RW(delay); - --static ssize_t sdebug_opts_show(struct device_driver * ddp, char * buf) -+static ssize_t opts_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "0x%x\n", scsi_debug_opts); - } - --static ssize_t sdebug_opts_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t opts_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int opts; - char work[20]; -@@ -2921,15 +2922,14 @@ opts_done: - scsi_debug_cmnd_count = 0; - return count; - } --DRIVER_ATTR(opts, S_IRUGO | S_IWUSR, sdebug_opts_show, -- sdebug_opts_store); -+static DRIVER_ATTR_RW(opts); - --static ssize_t sdebug_ptype_show(struct device_driver * ddp, char * buf) -+static ssize_t ptype_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_ptype); - } --static ssize_t sdebug_ptype_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t ptype_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -2939,14 +2939,14 @@ static ssize_t sdebug_ptype_store(struct - } - return -EINVAL; - } --DRIVER_ATTR(ptype, S_IRUGO | S_IWUSR, sdebug_ptype_show, sdebug_ptype_store); -+static DRIVER_ATTR_RW(ptype); - --static ssize_t sdebug_dsense_show(struct device_driver * ddp, char * buf) -+static ssize_t dsense_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dsense); - } --static ssize_t sdebug_dsense_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t dsense_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -2956,15 +2956,14 @@ static ssize_t sdebug_dsense_store(struc - } - return -EINVAL; - } --DRIVER_ATTR(dsense, S_IRUGO | S_IWUSR, sdebug_dsense_show, -- sdebug_dsense_store); -+static DRIVER_ATTR_RW(dsense); - --static ssize_t sdebug_fake_rw_show(struct device_driver * ddp, char * buf) -+static ssize_t fake_rw_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_fake_rw); - } --static ssize_t sdebug_fake_rw_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t fake_rw_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -2974,15 +2973,14 @@ static ssize_t sdebug_fake_rw_store(stru - } - return -EINVAL; - } --DRIVER_ATTR(fake_rw, S_IRUGO | S_IWUSR, sdebug_fake_rw_show, -- sdebug_fake_rw_store); -+static DRIVER_ATTR_RW(fake_rw); - --static ssize_t sdebug_no_lun_0_show(struct device_driver * ddp, char * buf) -+static ssize_t no_lun_0_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_no_lun_0); - } --static ssize_t sdebug_no_lun_0_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t no_lun_0_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -2992,15 +2990,14 @@ static ssize_t sdebug_no_lun_0_store(str - } - return -EINVAL; - } --DRIVER_ATTR(no_lun_0, S_IRUGO | S_IWUSR, sdebug_no_lun_0_show, -- sdebug_no_lun_0_store); -+static DRIVER_ATTR_RW(no_lun_0); - --static ssize_t sdebug_num_tgts_show(struct device_driver * ddp, char * buf) -+static ssize_t num_tgts_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_tgts); - } --static ssize_t sdebug_num_tgts_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t num_tgts_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -3011,27 +3008,26 @@ static ssize_t sdebug_num_tgts_store(str - } - return -EINVAL; - } --DRIVER_ATTR(num_tgts, S_IRUGO | S_IWUSR, sdebug_num_tgts_show, -- sdebug_num_tgts_store); -+static DRIVER_ATTR_RW(num_tgts); - --static ssize_t sdebug_dev_size_mb_show(struct device_driver * ddp, char * buf) -+static ssize_t dev_size_mb_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dev_size_mb); - } --DRIVER_ATTR(dev_size_mb, S_IRUGO, sdebug_dev_size_mb_show, NULL); -+static DRIVER_ATTR_RO(dev_size_mb); - --static ssize_t sdebug_num_parts_show(struct device_driver * ddp, char * buf) -+static ssize_t num_parts_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_parts); - } --DRIVER_ATTR(num_parts, S_IRUGO, sdebug_num_parts_show, NULL); -+static DRIVER_ATTR_RO(num_parts); - --static ssize_t sdebug_every_nth_show(struct device_driver * ddp, char * buf) -+static ssize_t every_nth_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_every_nth); - } --static ssize_t sdebug_every_nth_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t every_nth_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int nth; - -@@ -3042,15 +3038,14 @@ static ssize_t sdebug_every_nth_store(st - } - return -EINVAL; - } --DRIVER_ATTR(every_nth, S_IRUGO | S_IWUSR, sdebug_every_nth_show, -- sdebug_every_nth_store); -+static DRIVER_ATTR_RW(every_nth); - --static ssize_t sdebug_max_luns_show(struct device_driver * ddp, char * buf) -+static ssize_t max_luns_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_max_luns); - } --static ssize_t sdebug_max_luns_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t max_luns_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -3061,15 +3056,14 @@ static ssize_t sdebug_max_luns_store(str - } - return -EINVAL; - } --DRIVER_ATTR(max_luns, S_IRUGO | S_IWUSR, sdebug_max_luns_show, -- sdebug_max_luns_store); -+static DRIVER_ATTR_RW(max_luns); - --static ssize_t sdebug_max_queue_show(struct device_driver * ddp, char * buf) -+static ssize_t max_queue_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_max_queue); - } --static ssize_t sdebug_max_queue_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t max_queue_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -3080,27 +3074,26 @@ static ssize_t sdebug_max_queue_store(st - } - return -EINVAL; - } --DRIVER_ATTR(max_queue, S_IRUGO | S_IWUSR, sdebug_max_queue_show, -- sdebug_max_queue_store); -+static DRIVER_ATTR_RW(max_queue); - --static ssize_t sdebug_no_uld_show(struct device_driver * ddp, char * buf) -+static ssize_t no_uld_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_no_uld); - } --DRIVER_ATTR(no_uld, S_IRUGO, sdebug_no_uld_show, NULL); -+static DRIVER_ATTR_RO(no_uld); - --static ssize_t sdebug_scsi_level_show(struct device_driver * ddp, char * buf) -+static ssize_t scsi_level_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_scsi_level); - } --DRIVER_ATTR(scsi_level, S_IRUGO, sdebug_scsi_level_show, NULL); -+static DRIVER_ATTR_RO(scsi_level); - --static ssize_t sdebug_virtual_gb_show(struct device_driver * ddp, char * buf) -+static ssize_t virtual_gb_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_virtual_gb); - } --static ssize_t sdebug_virtual_gb_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t virtual_gb_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int n; - -@@ -3113,16 +3106,15 @@ static ssize_t sdebug_virtual_gb_store(s - } - return -EINVAL; - } --DRIVER_ATTR(virtual_gb, S_IRUGO | S_IWUSR, sdebug_virtual_gb_show, -- sdebug_virtual_gb_store); -+static DRIVER_ATTR_RW(virtual_gb); - --static ssize_t sdebug_add_host_show(struct device_driver * ddp, char * buf) -+static ssize_t add_host_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_add_host); - } - --static ssize_t sdebug_add_host_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t add_host_store(struct device_driver * ddp, const char * buf, -+ size_t count) - { - int delta_hosts; - -@@ -3139,16 +3131,14 @@ static ssize_t sdebug_add_host_store(str - } - return count; - } --DRIVER_ATTR(add_host, S_IRUGO | S_IWUSR, sdebug_add_host_show, -- sdebug_add_host_store); -+static DRIVER_ATTR_RW(add_host); - --static ssize_t sdebug_vpd_use_hostno_show(struct device_driver * ddp, -- char * buf) -+static ssize_t vpd_use_hostno_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_vpd_use_hostno); - } --static ssize_t sdebug_vpd_use_hostno_store(struct device_driver * ddp, -- const char * buf, size_t count) -+static ssize_t vpd_use_hostno_store(struct device_driver * ddp, -+ const char * buf, size_t count) - { - int n; - -@@ -3158,40 +3148,39 @@ static ssize_t sdebug_vpd_use_hostno_sto - } - return -EINVAL; - } --DRIVER_ATTR(vpd_use_hostno, S_IRUGO | S_IWUSR, sdebug_vpd_use_hostno_show, -- sdebug_vpd_use_hostno_store); -+static DRIVER_ATTR_RW(vpd_use_hostno); - --static ssize_t sdebug_sector_size_show(struct device_driver * ddp, char * buf) -+static ssize_t sector_size_show(struct device_driver * ddp, char * buf) - { - return scnprintf(buf, PAGE_SIZE, "%u\n", scsi_debug_sector_size); - } --DRIVER_ATTR(sector_size, S_IRUGO, sdebug_sector_size_show, NULL); -+static DRIVER_ATTR_RO(sector_size); - --static ssize_t sdebug_dix_show(struct device_driver *ddp, char *buf) -+static ssize_t dix_show(struct device_driver *ddp, char *buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dix); - } --DRIVER_ATTR(dix, S_IRUGO, sdebug_dix_show, NULL); -+static DRIVER_ATTR_RO(dix); - --static ssize_t sdebug_dif_show(struct device_driver *ddp, char *buf) -+static ssize_t dif_show(struct device_driver *ddp, char *buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dif); - } --DRIVER_ATTR(dif, S_IRUGO, sdebug_dif_show, NULL); -+static DRIVER_ATTR_RO(dif); - --static ssize_t sdebug_guard_show(struct device_driver *ddp, char *buf) -+static ssize_t guard_show(struct device_driver *ddp, char *buf) - { - return scnprintf(buf, PAGE_SIZE, "%u\n", scsi_debug_guard); - } --DRIVER_ATTR(guard, S_IRUGO, sdebug_guard_show, NULL); -+static DRIVER_ATTR_RO(guard); - --static ssize_t sdebug_ato_show(struct device_driver *ddp, char *buf) -+static ssize_t ato_show(struct device_driver *ddp, char *buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_ato); - } --DRIVER_ATTR(ato, S_IRUGO, sdebug_ato_show, NULL); -+static DRIVER_ATTR_RO(ato); - --static ssize_t sdebug_map_show(struct device_driver *ddp, char *buf) -+static ssize_t map_show(struct device_driver *ddp, char *buf) - { - ssize_t count; - -@@ -3206,15 +3195,14 @@ static ssize_t sdebug_map_show(struct de - - return count; - } --DRIVER_ATTR(map, S_IRUGO, sdebug_map_show, NULL); -+static DRIVER_ATTR_RO(map); - --static ssize_t sdebug_removable_show(struct device_driver *ddp, -- char *buf) -+static ssize_t removable_show(struct device_driver *ddp, char *buf) - { - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_removable ? 1 : 0); - } --static ssize_t sdebug_removable_store(struct device_driver *ddp, -- const char *buf, size_t count) -+static ssize_t removable_store(struct device_driver *ddp, const char *buf, -+ size_t count) - { - int n; - -@@ -3224,74 +3212,42 @@ static ssize_t sdebug_removable_store(st - } - return -EINVAL; - } --DRIVER_ATTR(removable, S_IRUGO | S_IWUSR, sdebug_removable_show, -- sdebug_removable_store); -+static DRIVER_ATTR_RW(removable); - -- --/* Note: The following function creates attribute files in the -+/* Note: The following function attribute files are located in the - /sys/bus/pseudo/drivers/scsi_debug directory. The advantage of these - files (over those found in the /sys/module/scsi_debug/parameters - directory) is that auxiliary actions can be triggered when an attribute -- is changed. For example see: sdebug_add_host_store() above. -+ is changed. For example see: add_host_store() above. - */ --static int do_create_driverfs_files(void) --{ -- int ret; -- -- ret = driver_create_file(&sdebug_driverfs_driver, &driver_attr_add_host); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_delay); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dsense); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_every_nth); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_fake_rw); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_max_luns); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_max_queue); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_no_lun_0); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_no_uld); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_parts); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_tgts); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_ptype); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_opts); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_removable); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_scsi_level); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_virtual_gb); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_vpd_use_hostno); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_sector_size); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dix); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dif); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_guard); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_ato); -- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_map); -- return ret; --} -- --static void do_remove_driverfs_files(void) --{ -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_map); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_ato); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_guard); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dif); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dix); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_sector_size); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_vpd_use_hostno); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_virtual_gb); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_scsi_level); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_opts); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_ptype); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_removable); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_num_tgts); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_num_parts); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_no_uld); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_no_lun_0); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_max_queue); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_max_luns); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_fake_rw); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_every_nth); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dsense); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_delay); -- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_add_host); --} -+static struct attribute *sdebug_drv_attrs[] = { -+ &driver_attr_add_host.attr, -+ &driver_attr_delay.attr, -+ &driver_attr_dev_size_mb.attr, -+ &driver_attr_dsense.attr, -+ &driver_attr_every_nth.attr, -+ &driver_attr_fake_rw.attr, -+ &driver_attr_max_luns.attr, -+ &driver_attr_max_queue.attr, -+ &driver_attr_no_lun_0.attr, -+ &driver_attr_no_uld.attr, -+ &driver_attr_num_parts.attr, -+ &driver_attr_num_tgts.attr, -+ &driver_attr_ptype.attr, -+ &driver_attr_opts.attr, -+ &driver_attr_removable.attr, -+ &driver_attr_scsi_level.attr, -+ &driver_attr_virtual_gb.attr, -+ &driver_attr_vpd_use_hostno.attr, -+ &driver_attr_sector_size.attr, -+ &driver_attr_dix.attr, -+ &driver_attr_dif.attr, -+ &driver_attr_guard.attr, -+ &driver_attr_ato.attr, -+ &driver_attr_map.attr, -+ NULL, -+}; -+ATTRIBUTE_GROUPS(sdebug_drv); - - struct device *pseudo_primary; - -@@ -3456,12 +3412,6 @@ static int __init scsi_debug_init(void) - ret); - goto bus_unreg; - } -- ret = do_create_driverfs_files(); -- if (ret < 0) { -- printk(KERN_WARNING "scsi_debug: driver_create_file error: %d\n", -- ret); -- goto del_files; -- } - - init_all_queued(); - -@@ -3482,9 +3432,6 @@ static int __init scsi_debug_init(void) - } - return 0; - --del_files: -- do_remove_driverfs_files(); -- driver_unregister(&sdebug_driverfs_driver); - bus_unreg: - bus_unregister(&pseudo_lld_bus); - dev_unreg: -@@ -3506,7 +3453,6 @@ static void __exit scsi_debug_exit(void) - stop_all_queued(); - for (; k; k--) - sdebug_remove_adapter(); -- do_remove_driverfs_files(); - driver_unregister(&sdebug_driverfs_driver); - bus_unregister(&pseudo_lld_bus); - root_device_unregister(pseudo_primary); --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -83,6 +83,7 @@ static int try_wdio = 1; @@ -987,7 +470,7 @@ }, }; -@@ -4304,14 +4303,8 @@ static int __init init_st(void) +@@ -4301,14 +4300,8 @@ static int __init init_st(void) if (err) goto err_chrdev; @@ -1002,7 +485,7 @@ err_chrdev: unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), ST_MAX_TAPE_ENTRIES); -@@ -4322,7 +4315,6 @@ err_class: +@@ -4319,7 +4312,6 @@ err_class: static void __exit exit_st(void) { @@ -1010,7 +493,7 @@ scsi_unregister_driver(&st_template.gendrv); unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), ST_MAX_TAPE_ENTRIES); -@@ -4335,68 +4327,38 @@ module_exit(exit_st); +@@ -4332,68 +4324,38 @@ module_exit(exit_st); /* The sysfs driver interface. Read-only at the moment */ |
