diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-05-02 00:02:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:54:52 -0400 |
commit | aab0de245150c09e61c30962feb16aacde508dc3 (patch) | |
tree | cd9cfa1e2c09aeb4cdeee605efa45fef90f0d38a | |
parent | f75b1c60fc1e53c4004a79ea0be071aa3318cdcc (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>
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/vio.c | 2 | ||||
-rw-r--r-- | drivers/message/fusion/mptbase.c | 3 | ||||
-rw-r--r-- | drivers/message/fusion/mptbase.h | 4 | ||||
-rw-r--r-- | drivers/message/fusion/mptfc.c | 4 | ||||
-rw-r--r-- | drivers/pci/hotplug/acpiphp.h | 4 | ||||
-rw-r--r-- | drivers/scsi/hosts.c | 4 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 9 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 4 | ||||
-rw-r--r-- | fs/partitions/check.c | 2 | ||||
-rw-r--r-- | include/linux/device.h | 3 | ||||
-rw-r--r-- | include/linux/kobject.h | 1 | ||||
-rw-r--r-- | include/linux/spi/spi.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 2 |
16 files changed, 26 insertions, 26 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 6f33f58bca45..848fdcafaa28 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -334,7 +334,7 @@ static int omap_mbox_init(struct omap_mbox *mbox) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | mbox->dev.class = &omap_mbox_class; | 336 | mbox->dev.class = &omap_mbox_class; |
337 | strlcpy(mbox->dev.bus_id, mbox->name, KOBJ_NAME_LEN); | 337 | strlcpy(mbox->dev.bus_id, mbox->name, BUS_ID_SIZE); |
338 | dev_set_drvdata(&mbox->dev, mbox); | 338 | dev_set_drvdata(&mbox->dev, mbox); |
339 | 339 | ||
340 | ret = device_register(&mbox->dev); | 340 | ret = device_register(&mbox->dev); |
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c index e78b3517940b..ecbb8b618b8c 100644 --- a/arch/sparc64/kernel/vio.c +++ b/arch/sparc64/kernel/vio.c | |||
@@ -224,7 +224,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, | |||
224 | if (!strcmp(type, "domain-services-port")) | 224 | if (!strcmp(type, "domain-services-port")) |
225 | bus_id_name = "ds"; | 225 | bus_id_name = "ds"; |
226 | 226 | ||
227 | if (strlen(bus_id_name) >= KOBJ_NAME_LEN - 4) { | 227 | if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) { |
228 | printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", | 228 | printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", |
229 | bus_id_name); | 229 | bus_id_name); |
230 | return NULL; | 230 | return NULL; |
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 | ||
56 | struct acpiphp_bridge; | 56 | struct acpiphp_bridge; |
57 | struct acpiphp_slot; | 57 | struct 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) |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 6149e4b58c88..efef715135d3 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -401,7 +401,7 @@ void register_disk(struct gendisk *disk) | |||
401 | disk->dev.parent = disk->driverfs_dev; | 401 | disk->dev.parent = disk->driverfs_dev; |
402 | disk->dev.devt = MKDEV(disk->major, disk->first_minor); | 402 | disk->dev.devt = MKDEV(disk->major, disk->first_minor); |
403 | 403 | ||
404 | strlcpy(disk->dev.bus_id, disk->disk_name, KOBJ_NAME_LEN); | 404 | strlcpy(disk->dev.bus_id, disk->disk_name, BUS_ID_SIZE); |
405 | /* ewww... some of these buggers have / in the name... */ | 405 | /* ewww... some of these buggers have / in the name... */ |
406 | s = strchr(disk->dev.bus_id, '/'); | 406 | s = strchr(disk->dev.bus_id, '/'); |
407 | if (s) | 407 | if (s) |
diff --git a/include/linux/device.h b/include/linux/device.h index 0e1d24c2ed41..fba1bb0d1758 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -29,8 +29,7 @@ | |||
29 | /* DEVICE_NAME_HALF is really less than half to accommodate slop */ | 29 | /* DEVICE_NAME_HALF is really less than half to accommodate slop */ |
30 | #define DEVICE_NAME_HALF __stringify(20) | 30 | #define DEVICE_NAME_HALF __stringify(20) |
31 | #define DEVICE_ID_SIZE 32 | 31 | #define DEVICE_ID_SIZE 32 |
32 | #define BUS_ID_SIZE KOBJ_NAME_LEN | 32 | #define BUS_ID_SIZE 20 |
33 | |||
34 | 33 | ||
35 | struct device; | 34 | struct device; |
36 | struct device_driver; | 35 | struct device_driver; |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 39e709f88aa0..d542faa6cb47 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
27 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
28 | 28 | ||
29 | #define KOBJ_NAME_LEN 20 | ||
30 | #define UEVENT_HELPER_PATH_LEN 256 | 29 | #define UEVENT_HELPER_PATH_LEN 256 |
31 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ | 30 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ |
32 | #define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */ | 31 | #define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */ |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 387e428f1cdf..b9a76c972084 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -733,7 +733,7 @@ struct spi_board_info { | |||
733 | * controller_data goes to spi_device.controller_data, | 733 | * controller_data goes to spi_device.controller_data, |
734 | * irq is copied too | 734 | * irq is copied too |
735 | */ | 735 | */ |
736 | char modalias[KOBJ_NAME_LEN]; | 736 | char modalias[32]; |
737 | const void *platform_data; | 737 | const void *platform_data; |
738 | void *controller_data; | 738 | void *controller_data; |
739 | int irq; | 739 | int irq; |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 1834fdfe82a7..a594bac4a77d 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -623,7 +623,7 @@ struct Scsi_Host { | |||
623 | /* | 623 | /* |
624 | * Optional work queue to be utilized by the transport | 624 | * Optional work queue to be utilized by the transport |
625 | */ | 625 | */ |
626 | char work_q_name[KOBJ_NAME_LEN]; | 626 | char work_q_name[20]; |
627 | struct workqueue_struct *work_q; | 627 | struct workqueue_struct *work_q; |
628 | 628 | ||
629 | /* | 629 | /* |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 06f72bab9df0..878373c32ef7 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -489,9 +489,9 @@ struct fc_host_attrs { | |||
489 | u16 npiv_vports_inuse; | 489 | u16 npiv_vports_inuse; |
490 | 490 | ||
491 | /* work queues for rport state manipulation */ | 491 | /* work queues for rport state manipulation */ |
492 | char work_q_name[KOBJ_NAME_LEN]; | 492 | char work_q_name[20]; |
493 | struct workqueue_struct *work_q; | 493 | struct workqueue_struct *work_q; |
494 | char devloss_work_q_name[KOBJ_NAME_LEN]; | 494 | char devloss_work_q_name[20]; |
495 | struct workqueue_struct *devloss_work_q; | 495 | struct workqueue_struct *devloss_work_q; |
496 | }; | 496 | }; |
497 | 497 | ||
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index f5444e033cc9..8b6c91df4c7a 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -198,7 +198,7 @@ struct iscsi_cls_host { | |||
198 | atomic_t nr_scans; | 198 | atomic_t nr_scans; |
199 | struct mutex mutex; | 199 | struct mutex mutex; |
200 | struct workqueue_struct *scan_workq; | 200 | struct workqueue_struct *scan_workq; |
201 | char scan_workq_name[KOBJ_NAME_LEN]; | 201 | char scan_workq_name[20]; |
202 | }; | 202 | }; |
203 | 203 | ||
204 | extern void iscsi_host_for_each_session(struct Scsi_Host *shost, | 204 | extern void iscsi_host_for_each_session(struct Scsi_Host *shost, |