diff options
| author | David S. Miller <davem@redhat.com> | 2002-06-10 19:21:49 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-06-10 19:21:49 -0700 |
| commit | b13c691e4eaa1e7dbca5ed45c7e3d34045c75bc1 (patch) | |
| tree | c9ab6463f734f21a90842731b23106022a4f85c1 /drivers/usb/class | |
| parent | 7c8f455e7d3962d78ce0b785d184e61013f35ee0 (diff) | |
[PATCH] Warning fix
DEVICE_ID_SIZE clashes with the define in include/linux/device.h
Diffstat (limited to 'drivers/usb/class')
| -rw-r--r-- | drivers/usb/class/printer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/class/printer.c b/drivers/usb/class/printer.c index fbb4353a3a1b..c90b917a5379 100644 --- a/drivers/usb/class/printer.c +++ b/drivers/usb/class/printer.c @@ -64,7 +64,7 @@ #define DRIVER_DESC "USB Printer Device Class driver" #define USBLP_BUF_SIZE 8192 -#define DEVICE_ID_SIZE 1024 +#define USBLP_DEVICE_ID_SIZE 1024 /* ioctls: */ #define LPGETSTATUS 0x060b /* same as in drivers/char/lp.c */ @@ -839,7 +839,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum, /* Malloc device ID string buffer to the largest expected length, * since we can re-query it on an ioctl and a dynamic string * could change in length. */ - if (!(usblp->device_id_string = kmalloc(DEVICE_ID_SIZE, GFP_KERNEL))) { + if (!(usblp->device_id_string = kmalloc(USBLP_DEVICE_ID_SIZE, GFP_KERNEL))) { err("out of memory for device_id_string"); goto abort_minor; } @@ -1045,7 +1045,7 @@ static int usblp_cache_device_id_string(struct usblp *usblp) { int err, length; - err = usblp_get_id(usblp, 0, usblp->device_id_string, DEVICE_ID_SIZE - 1); + err = usblp_get_id(usblp, 0, usblp->device_id_string, USBLP_DEVICE_ID_SIZE - 1); if (err < 0) { dbg("usblp%d: error = %d reading IEEE-1284 Device ID string", usblp->minor, err); @@ -1059,8 +1059,8 @@ static int usblp_cache_device_id_string(struct usblp *usblp) length = (usblp->device_id_string[0] << 8) + usblp->device_id_string[1]; if (length < 2) length = 2; - else if (length >= DEVICE_ID_SIZE) - length = DEVICE_ID_SIZE - 1; + else if (length >= USBLP_DEVICE_ID_SIZE) + length = USBLP_DEVICE_ID_SIZE - 1; usblp->device_id_string[length] = '\0'; dbg("usblp%d Device ID string [len=%d]=\"%s\"", |
