Skip to content

Commit

Permalink
driver core: remove DEVICE_NAME_SIZE define
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kaysievers authored and gregkh committed Jul 22, 2008
1 parent aab0de2 commit ca52a49
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion drivers/eisa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions drivers/eisa/eisa-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/mca/mca-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/aty/aty128fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/aty/radeonfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/linux/eisa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down

0 comments on commit ca52a49

Please sign in to comment.