aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-05-02 00:02:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 00:54:52 -0400
commitaab0de245150c09e61c30962feb16aacde508dc3 (patch)
treecd9cfa1e2c09aeb4cdeee605efa45fef90f0d38a /drivers
parentf75b1c60fc1e53c4004a79ea0be071aa3318cdcc (diff)
driver core: remove KOBJ_NAME_LEN define
Kobjects do not have a limit in name size since a while, so stop pretending that they do. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/message/fusion/mptbase.c3
-rw-r--r--drivers/message/fusion/mptbase.h4
-rw-r--r--drivers/message/fusion/mptfc.c4
-rw-r--r--drivers/pci/hotplug/acpiphp.h4
-rw-r--r--drivers/scsi/hosts.c4
-rw-r--r--drivers/scsi/scsi_transport_fc.c9
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c4
7 files changed, 17 insertions, 15 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 75e599b85b64..34402c47027e 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1670,7 +1670,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1670 INIT_DELAYED_WORK(&ioc->fault_reset_work, mpt_fault_reset_work); 1670 INIT_DELAYED_WORK(&ioc->fault_reset_work, mpt_fault_reset_work);
1671 spin_lock_init(&ioc->fault_reset_work_lock); 1671 spin_lock_init(&ioc->fault_reset_work_lock);
1672 1672
1673 snprintf(ioc->reset_work_q_name, KOBJ_NAME_LEN, "mpt_poll_%d", ioc->id); 1673 snprintf(ioc->reset_work_q_name, sizeof(ioc->reset_work_q_name),
1674 "mpt_poll_%d", ioc->id);
1674 ioc->reset_work_q = 1675 ioc->reset_work_q =
1675 create_singlethread_workqueue(ioc->reset_work_q_name); 1676 create_singlethread_workqueue(ioc->reset_work_q_name);
1676 if (!ioc->reset_work_q) { 1677 if (!ioc->reset_work_q) {
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 6adab648dbb9..dff048cfa101 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -707,12 +707,12 @@ typedef struct _MPT_ADAPTER
707 u8 fc_link_speed[2]; 707 u8 fc_link_speed[2];
708 spinlock_t fc_rescan_work_lock; 708 spinlock_t fc_rescan_work_lock;
709 struct work_struct fc_rescan_work; 709 struct work_struct fc_rescan_work;
710 char fc_rescan_work_q_name[KOBJ_NAME_LEN]; 710 char fc_rescan_work_q_name[20];
711 struct workqueue_struct *fc_rescan_work_q; 711 struct workqueue_struct *fc_rescan_work_q;
712 struct scsi_cmnd **ScsiLookup; 712 struct scsi_cmnd **ScsiLookup;
713 spinlock_t scsi_lookup_lock; 713 spinlock_t scsi_lookup_lock;
714 714
715 char reset_work_q_name[KOBJ_NAME_LEN]; 715 char reset_work_q_name[20];
716 struct workqueue_struct *reset_work_q; 716 struct workqueue_struct *reset_work_q;
717 struct delayed_work fault_reset_work; 717 struct delayed_work fault_reset_work;
718 spinlock_t fault_reset_work_lock; 718 spinlock_t fault_reset_work_lock;
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index fc31ca6829d8..b36cae9ec6db 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -1326,8 +1326,8 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1326 1326
1327 /* initialize workqueue */ 1327 /* initialize workqueue */
1328 1328
1329 snprintf(ioc->fc_rescan_work_q_name, KOBJ_NAME_LEN, "mptfc_wq_%d", 1329 snprintf(ioc->fc_rescan_work_q_name, sizeof(ioc->fc_rescan_work_q_name),
1330 sh->host_no); 1330 "mptfc_wq_%d", sh->host_no);
1331 ioc->fc_rescan_work_q = 1331 ioc->fc_rescan_work_q =
1332 create_singlethread_workqueue(ioc->fc_rescan_work_q_name); 1332 create_singlethread_workqueue(ioc->fc_rescan_work_q_name);
1333 if (!ioc->fc_rescan_work_q) 1333 if (!ioc->fc_rescan_work_q)
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index eecf7cbf4139..5a58b075dd8d 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -36,7 +36,7 @@
36#define _ACPIPHP_H 36#define _ACPIPHP_H
37 37
38#include <linux/acpi.h> 38#include <linux/acpi.h>
39#include <linux/kobject.h> /* for KOBJ_NAME_LEN */ 39#include <linux/kobject.h>
40#include <linux/mutex.h> 40#include <linux/mutex.h>
41#include <linux/pci_hotplug.h> 41#include <linux/pci_hotplug.h>
42 42
@@ -51,7 +51,7 @@
51#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg) 51#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
52 52
53/* name size which is used for entries in pcihpfs */ 53/* name size which is used for entries in pcihpfs */
54#define SLOT_NAME_SIZE KOBJ_NAME_LEN /* {_SUN} */ 54#define SLOT_NAME_SIZE 20 /* {_SUN} */
55 55
56struct acpiphp_bridge; 56struct acpiphp_bridge;
57struct acpiphp_slot; 57struct acpiphp_slot;
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 78dad28b70d5..fed0b02ebc1d 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -232,8 +232,8 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
232 } 232 }
233 233
234 if (shost->transportt->create_work_queue) { 234 if (shost->transportt->create_work_queue) {
235 snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d", 235 snprintf(shost->work_q_name, sizeof(shost->work_q_name),
236 shost->host_no); 236 "scsi_wq_%d", shost->host_no);
237 shost->work_q = create_singlethread_workqueue( 237 shost->work_q = create_singlethread_workqueue(
238 shost->work_q_name); 238 shost->work_q_name);
239 if (!shost->work_q) { 239 if (!shost->work_q) {
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 5fd64e70029d..a272b9a2c869 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -417,15 +417,16 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev,
417 fc_host->next_vport_number = 0; 417 fc_host->next_vport_number = 0;
418 fc_host->npiv_vports_inuse = 0; 418 fc_host->npiv_vports_inuse = 0;
419 419
420 snprintf(fc_host->work_q_name, KOBJ_NAME_LEN, "fc_wq_%d", 420 snprintf(fc_host->work_q_name, sizeof(fc_host->work_q_name),
421 shost->host_no); 421 "fc_wq_%d", shost->host_no);
422 fc_host->work_q = create_singlethread_workqueue( 422 fc_host->work_q = create_singlethread_workqueue(
423 fc_host->work_q_name); 423 fc_host->work_q_name);
424 if (!fc_host->work_q) 424 if (!fc_host->work_q)
425 return -ENOMEM; 425 return -ENOMEM;
426 426
427 snprintf(fc_host->devloss_work_q_name, KOBJ_NAME_LEN, "fc_dl_%d", 427 snprintf(fc_host->devloss_work_q_name,
428 shost->host_no); 428 sizeof(fc_host->devloss_work_q_name),
429 "fc_dl_%d", shost->host_no);
429 fc_host->devloss_work_q = create_singlethread_workqueue( 430 fc_host->devloss_work_q = create_singlethread_workqueue(
430 fc_host->devloss_work_q_name); 431 fc_host->devloss_work_q_name);
431 if (!fc_host->devloss_work_q) { 432 if (!fc_host->devloss_work_q) {
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 06748f318cd5..043c3921164f 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -247,8 +247,8 @@ static int iscsi_setup_host(struct transport_container *tc, struct device *dev,
247 atomic_set(&ihost->nr_scans, 0); 247 atomic_set(&ihost->nr_scans, 0);
248 mutex_init(&ihost->mutex); 248 mutex_init(&ihost->mutex);
249 249
250 snprintf(ihost->scan_workq_name, KOBJ_NAME_LEN, "iscsi_scan_%d", 250 snprintf(ihost->scan_workq_name, sizeof(ihost->scan_workq_name),
251 shost->host_no); 251 "iscsi_scan_%d", shost->host_no);
252 ihost->scan_workq = create_singlethread_workqueue( 252 ihost->scan_workq = create_singlethread_workqueue(
253 ihost->scan_workq_name); 253 ihost->scan_workq_name);
254 if (!ihost->scan_workq) 254 if (!ihost->scan_workq)