Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b44d3bdd authored by Marko Kohtala's avatar Marko Kohtala Committed by Linus Torvalds
Browse files

[PATCH] parport: use complete slab buffer



Use the complete slab buffer that is allocated by kmalloc.

Signed-off-by: default avatarMarko Kohtala <marko.kohtala@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7c9cc3be
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -144,9 +144,9 @@ int parport_daisy_init (struct parport *port)
	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 *port)
		 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;