From: David Brownell <david-b@pacbell.net>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
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 10:48:32 -0800 [thread overview]
Message-ID: <200611171048.33086.david-b@pacbell.net> (raw)
In-Reply-To: <d120d5000611170632v5ab837a6u6df9fe054988e15@mail.gmail.com>
On Friday 17 November 2006 6:32 am, Dmitry Torokhov wrote:
> 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.
Huh?? No they won't. Are you thinking "__devinit" with CONFIG_HOTPLUG?
(Remember, this routine is not for use with hotpluggable devices.)
> Also, why don't you
> also remove "bind" attribute if driver is built-in. That should save a
> bit of dynamic memory.
That would be an additional nuance. Feel free to submit another patch
on top of this one ... :)
- Dave
> --
> Dmitry
>
next prev parent reply other threads:[~2006-11-17 18:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-17 7:28 [patch 2.6.19-rc6] platform_driver_probe(), can save codespace David Brownell
2006-11-17 14:32 ` Dmitry Torokhov
2006-11-17 18:48 ` David Brownell [this message]
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=200611171048.33086.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=dmitry.torokhov@gmail.com \
--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