summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@debian.org>2002-11-16 03:46:55 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-11-16 03:46:55 -0800
commit49ec0f072db58d01de0b995372f58e6a053ec453 (patch)
treefb6366a38ea27c73497d281837c49b959505ce6a /include/linux/device.h
parent5be2bc3c89f6813ab0ab21cdd27d6d0f2ee94d91 (diff)
[PATCH] eliminate pci_dev name
This removes the pci_dev "->name[]" field, and makes users use the "struct device" name field instead. It also trimps it down to 50 bytes and limited the length of the vendor & device descriptions to 20 bytes each. Now we have three cases: - unknown vendor & unknown device -> "PCI device %04x:%04x". Clearly limited to 21 chars. - known vendor, unknown device -> "PCI device %04x:%04x (%.20s)" 24 + 20 chars - known vendor, known device -> "%.20s %.20s" 20 + 1 + 20 + 1, EXCEPT: - multiple devices of the same type add " (#%d)" so 42 + 4 + 4 = 50. This is the point where an IBMer tells me they intend to sell a machine with > 9999 PCI devices of the same type ;-) This limits the PCI IDs to a reasonable amount of space. For release, I think we do want to go back up to 80 for prettier output
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 0bea391871ae..d2125b2059b6 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -23,14 +23,17 @@
#ifndef _DEVICE_H_
#define _DEVICE_H_
-#include <linux/types.h>
#include <linux/config.h>
#include <linux/ioport.h>
+#include <linux/kobject.h>
#include <linux/list.h>
#include <linux/sched.h>
-#include <linux/kobject.h>
+#include <linux/spinlock.h>
+#include <linux/types.h>
+#include <asm/atomic.h>
-#define DEVICE_NAME_SIZE 80
+#define DEVICE_NAME_SIZE 50
+#define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */
#define DEVICE_ID_SIZE 32
#define BUS_ID_SIZE 16