Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: remove DEVICE_NAME_SIZE define

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>

authored by

Kay Sievers and committed by
Greg Kroah-Hartman
ca52a498 aab0de24

+7 -10
+1 -1
drivers/eisa/Makefile
··· 9 9 10 10 11 11 # Ugly hack to get DEVICE_NAME_SIZE value... 12 - DEVICE_NAME_SIZE =$(shell awk '$$1=="\#define" && $$2=="DEVICE_NAME_SIZE" {print $$3-1}' $(srctree)/include/linux/device.h) 12 + DEVICE_NAME_SIZE = 50 13 13 14 14 $(obj)/eisa-bus.o: $(obj)/devlist.h 15 15
+2 -2
drivers/eisa/eisa-bus.c
··· 22 22 23 23 struct eisa_device_info { 24 24 struct eisa_device_id id; 25 - char name[DEVICE_NAME_SIZE]; 25 + char name[50]; 26 26 }; 27 27 28 28 #ifdef CONFIG_EISA_NAMES ··· 63 63 if (!strcmp (edev->id.sig, eisa_table[i].id.sig)) { 64 64 strlcpy (edev->pretty_name, 65 65 eisa_table[i].name, 66 - DEVICE_NAME_SIZE); 66 + sizeof(edev->pretty_name)); 67 67 return; 68 68 } 69 69 }
+1 -1
drivers/mca/mca-bus.c
··· 40 40 41 41 struct mca_device_info { 42 42 short pos_id; /* the 2 byte pos id for this card */ 43 - char name[DEVICE_NAME_SIZE]; 43 + char name[50]; 44 44 }; 45 45 46 46 static int mca_bus_match (struct device *dev, struct device_driver *drv)
+1 -1
drivers/video/aty/aty128fb.c
··· 1872 1872 struct fb_info *info = pci_get_drvdata(pdev); 1873 1873 struct aty128fb_par *par = info->par; 1874 1874 struct fb_var_screeninfo var; 1875 - char video_card[DEVICE_NAME_SIZE]; 1875 + char video_card[50]; 1876 1876 u8 chip_rev; 1877 1877 u32 dac; 1878 1878
+1 -1
drivers/video/aty/radeonfb.h
··· 289 289 struct radeon_regs state; 290 290 struct radeon_regs init_state; 291 291 292 - char name[DEVICE_NAME_SIZE]; 292 + char name[50]; 293 293 294 294 unsigned long mmio_base_phys; 295 295 unsigned long fb_base_phys;
-3
include/linux/device.h
··· 25 25 #include <asm/atomic.h> 26 26 #include <asm/device.h> 27 27 28 - #define DEVICE_NAME_SIZE 50 29 - /* DEVICE_NAME_HALF is really less than half to accommodate slop */ 30 - #define DEVICE_NAME_HALF __stringify(20) 31 28 #define DEVICE_ID_SIZE 32 32 29 #define BUS_ID_SIZE 20 33 30
+1 -1
include/linux/eisa.h
··· 40 40 u64 dma_mask; 41 41 struct device dev; /* generic device */ 42 42 #ifdef CONFIG_EISA_NAMES 43 - char pretty_name[DEVICE_NAME_SIZE]; 43 + char pretty_name[50]; 44 44 #endif 45 45 }; 46 46