From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "David Brownell" <david-b@pacbell.net>
Cc: "Greg KH" <greg@kroah.com>,
"Linux Kernel list" <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2.6.19-rc6] platform_driver_probe(), can save codespace
Date: Fri, 17 Nov 2006 09:32:15 -0500 [thread overview]
Message-ID: <d120d5000611170632v5ab837a6u6df9fe054988e15@mail.gmail.com> (raw)
In-Reply-To: <200611162328.47987.david-b@pacbell.net>
On 11/17/06, David Brownell <david-b@pacbell.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
next prev parent reply other threads:[~2006-11-17 14:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-17 7:28 David Brownell
2006-11-17 14:32 ` Dmitry Torokhov [this message]
2006-11-17 18:48 ` David Brownell
2006-11-17 19:11 ` Dmitry Torokhov
2006-11-17 20:26 ` David Brownell
2006-11-17 21:50 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d120d5000611170632v5ab837a6u6df9fe054988e15@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®