[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d120d5000611170632v5ab837a6u6df9fe054988e15@mail.gmail.com>
Date: Fri, 17 Nov 2006 09:32:15 -0500
From: "Dmitry Torokhov" <dmitry.torokhov@...il.com>
To: "David Brownell" <david-b@...bell.net>
Cc: "Greg KH" <greg@...ah.com>,
"Linux Kernel list" <linux-kernel@...r.kernel.org>
Subject: Re: [patch 2.6.19-rc6] platform_driver_probe(), can save codespace
On 11/17/06, David Brownell <david-b@...bell.net> wrote:
> +
> + /* Fixup that section violation, being paranoid about code scanning
> + * the list of drivers in order to probe new devices. Check to see
> + * if the probe was successful, and make sure any forced probes of
> + * new devices fail.
> + */
> + spin_lock(&platform_bus_type.klist_drivers.k_lock);
> + drv->probe = NULL;
> + if (code == 0 && list_empty(&drv->driver.klist_devices.k_list))
> + retval = -ENODEV;
> + drv->driver.probe = platform_drv_probe_fail;
> + spin_unlock(&platform_bus_type.klist_drivers.k_lock);
I think this code should not be executed if driver is compiled as a
module because __init sections will stay anyway. Also, why don't you
also remove "bind" attribute if driver is built-in. That should save a
bit of dynamic memory.
--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists