提交 b44d3bdd 编写于 作者: M Marko Kohtala 提交者: Linus Torvalds

[PATCH] parport: use complete slab buffer

Use the complete slab buffer that is allocated by kmalloc.
Signed-off-by: NMarko Kohtala <marko.kohtala@gmail.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 7c9cc3be
...@@ -144,9 +144,9 @@ int parport_daisy_init (struct parport *port) ...@@ -144,9 +144,9 @@ int parport_daisy_init (struct parport *port)
add_dev (numdevs++, port, -1); add_dev (numdevs++, port, -1);
/* Find out the legacy device's IEEE 1284 device ID. */ /* Find out the legacy device's IEEE 1284 device ID. */
deviceid = kmalloc (1000, GFP_KERNEL); deviceid = kmalloc (1024, GFP_KERNEL);
if (deviceid) { if (deviceid) {
if (parport_device_id (numdevs - 1, deviceid, 1000) > 2) if (parport_device_id (numdevs - 1, deviceid, 1024) > 2)
detected++; detected++;
kfree (deviceid); kfree (deviceid);
...@@ -508,11 +508,11 @@ static int assign_addrs (struct parport *port) ...@@ -508,11 +508,11 @@ static int assign_addrs (struct parport *port)
detected); detected);
/* Ask the new devices to introduce themselves. */ /* Ask the new devices to introduce themselves. */
deviceid = kmalloc (1000, GFP_KERNEL); deviceid = kmalloc (1024, GFP_KERNEL);
if (!deviceid) return 0; if (!deviceid) return 0;
for (daisy = 0; thisdev < numdevs; thisdev++, daisy++) for (daisy = 0; thisdev < numdevs; thisdev++, daisy++)
parport_device_id (thisdev, deviceid, 1000); parport_device_id (thisdev, deviceid, 1024);
kfree (deviceid); kfree (deviceid);
return detected; return detected;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册