mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 14:11:19 -0500	[thread overview]
Message-ID: <d120d5000611171111g51f624a6mb9ad694005f690a8@mail.gmail.com> (raw)
In-Reply-To: <200611171048.33086.david-b@pacbell.net>

On 11/17/06, David Brownell <david-b@pacbell.net> wrote:
> 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.)
>

Do we discard __init sections in modules nowadays? I thought we did
that only for the kernel image itself.

-- 
Dmitry

  reply	other threads:[~2006-11-17 19:11 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
2006-11-17 18:48   ` David Brownell
2006-11-17 19:11     ` Dmitry Torokhov [this message]
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=d120d5000611171111g51f624a6mb9ad694005f690a8@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®