lkml.org 
[lkml]   [2005]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 05/10] parport: ieee1284 fixes and cleanups
Use the complete slab buffer that is allocated by kmalloc.

Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com>

---
drivers/parport/daisy.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: linux-dvb/drivers/parport/daisy.c
===================================================================
--- linux-dvb.orig/drivers/parport/daisy.c 2005-08-29 20:17:06.000000000 +0300
+++ linux-dvb/drivers/parport/daisy.c 2005-08-29 20:17:26.000000000 +0300
@@ -144,9 +144,9 @@ again:
add_dev (numdevs++, port, -1);

/* Find out the legacy device's IEEE 1284 device ID. */
- deviceid = kmalloc (1000, GFP_KERNEL);
+ deviceid = kmalloc (1024, GFP_KERNEL);
if (deviceid) {
- if (parport_device_id (numdevs - 1, deviceid, 1000) > 2)
+ if (parport_device_id (numdevs - 1, deviceid, 1024) > 2)
detected++;

kfree (deviceid);
@@ -508,11 +508,11 @@ static int assign_addrs (struct parport
detected);

/* Ask the new devices to introduce themselves. */
- deviceid = kmalloc (1000, GFP_KERNEL);
+ deviceid = kmalloc (1024, GFP_KERNEL);
if (!deviceid) return 0;

for (daisy = 0; thisdev < numdevs; thisdev++, daisy++)
- parport_device_id (thisdev, deviceid, 1000);
+ parport_device_id (thisdev, deviceid, 1024);

kfree (deviceid);
return detected;
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-05 20:38    [from the cache]
©2003-2011 Jasper Spaans