driver core: remove DEVICE_NAME_SIZE define
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jul 2008 04:54:53 +0000 (21:54 -0700)
There is no such thing as a "device name size" in the driver core, so
remove the define and fix up any users of this odd define in the rest of
the kernel.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/eisa/Makefile
drivers/eisa/eisa-bus.c
drivers/mca/mca-bus.c
drivers/video/aty/aty128fb.c
drivers/video/aty/radeonfb.h
include/linux/device.h
include/linux/eisa.h

index 70abf93fe6b0e823239409613aa28ca1e2045d71..5369ce957c6d5397146cbbcb71c75aed01ebaa57 100644 (file)
@@ -9,7 +9,7 @@ obj-${CONFIG_EISA_VIRTUAL_ROOT} += virtual_root.o
 
 
 # Ugly hack to get DEVICE_NAME_SIZE value...
-DEVICE_NAME_SIZE =$(shell awk '$$1=="\#define" && $$2=="DEVICE_NAME_SIZE" {print $$3-1}' $(srctree)/include/linux/device.h)
+DEVICE_NAME_SIZE = 50
 
 $(obj)/eisa-bus.o: $(obj)/devlist.h
 
index 65dcf0432653b51b1593f94a4ae237584fe3a907..c950bf8606d967b07639ed14e0bfd643136df57d 100644 (file)
@@ -22,7 +22,7 @@
 
 struct eisa_device_info {
        struct eisa_device_id id;
-       char name[DEVICE_NAME_SIZE];
+       char name[50];
 };
 
 #ifdef CONFIG_EISA_NAMES
@@ -63,7 +63,7 @@ static void __init eisa_name_device (struct eisa_device *edev)
                if (!strcmp (edev->id.sig, eisa_table[i].id.sig)) {
                        strlcpy (edev->pretty_name,
                                 eisa_table[i].name,
-                                DEVICE_NAME_SIZE);
+                                sizeof(edev->pretty_name));
                        return;
                }
        }
index 67b8e9453b191a2c701970f4ccbdd4a5207dd1e3..ef2dbfe747141ee3940fa645e700d89d7a173981 100644 (file)
@@ -40,7 +40,7 @@ static struct mca_bus *mca_root_busses[MAX_MCA_BUSSES];
 
 struct mca_device_info {
        short pos_id;           /* the 2 byte pos id for this card */
-       char name[DEVICE_NAME_SIZE];
+       char name[50];
 };
 
 static int mca_bus_match (struct device *dev, struct device_driver *drv)
index 24ee96c4e9e9e5c816254444b7f002863363eda7..07b6addbb3c1a2631990db635e238703a891a82c 100644 (file)
@@ -1872,7 +1872,7 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
        struct fb_info *info = pci_get_drvdata(pdev);
        struct aty128fb_par *par = info->par;
        struct fb_var_screeninfo var;
-       char video_card[DEVICE_NAME_SIZE];
+       char video_card[50];
        u8 chip_rev;
        u32 dac;
 
index c347e38cd0b084719437e8157477aa220ef9e6f6..ccbfffd128056c57392f02ff59f2dfe318f5b24e 100644 (file)
@@ -289,7 +289,7 @@ struct radeonfb_info {
        struct radeon_regs      state;
        struct radeon_regs      init_state;
 
-       char                    name[DEVICE_NAME_SIZE];
+       char                    name[50];
 
        unsigned long           mmio_base_phys;
        unsigned long           fb_base_phys;
index fba1bb0d17587e04c477856e23b6f149ae459873..894fdb2e483a168abc79283329793aba712269df 100644 (file)
@@ -25,9 +25,6 @@
 #include <asm/atomic.h>
 #include <asm/device.h>
 
-#define DEVICE_NAME_SIZE       50
-/* DEVICE_NAME_HALF is really less than half to accommodate slop */
-#define DEVICE_NAME_HALF       __stringify(20)
 #define DEVICE_ID_SIZE         32
 #define BUS_ID_SIZE            20
 
index fe806b6f030dfb2d7583751cc33d96f36a8b7d90..e61c0be2a45977fb61e48b0b0eb89f016b7c978d 100644 (file)
@@ -40,7 +40,7 @@ struct eisa_device {
        u64                   dma_mask;
        struct device         dev; /* generic device */
 #ifdef CONFIG_EISA_NAMES
-       char                  pretty_name[DEVICE_NAME_SIZE];
+       char                  pretty_name[50];
 #endif
 };