All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerard Snitselaar <dev@snitselaar.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, fmhess@users.sourceforge.net,
	abbotti@mev.co.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: comedi: resolve section mismatch in s626
Date: Mon, 19 Mar 2012 15:46:49 -0700	[thread overview]
Message-ID: <20120319224649.GA7679@perelman.Home> (raw)
In-Reply-To: <20120319164325.GA31833@perelman.Home>

On Mon, Mar 19, 2012 at 09:43:25AM -0700, Gerard Snitselaar wrote:
> On Mon, Mar 19, 2012 at 09:31:03AM -0700, Greg KH wrote:
> > 
> > Ick, why is this loop even needed?  We are only here if the pci device
> > is present in the system so this shouldn't be needed at all, right?
> > 
> > Or is this a bit more complex than I am making it out to be?
> > 
> > greg k-h
> 
> Most likely not. I will take a look at some of the other drivers in
> comedi and see how the attach code looks there. I believe the code
> section in hpdi_attach() was written by the same person. Unfortunately
> I don't have a device to actually play around and see what changes are
> doing.
> 

I looked at this a bit more. It looks like they lose visibility to the
pci_dev structure.

*_probe() 
   comedi_pci_auto_config()     pci_dev
      comedi_auto_config()      pci_dev->dev
         comedi_device_attach() ??
            driv->attach()      ?? <= iterate through pci devices.

Most of the examples I have looked at so far use for_each_pci_dev() to
find the device, and s626 shortcuts it a bit by directly making calls
to pci_get_subsys() with specific ids. They all verify they have the
right device by checking the bus and slot that are grabbed from the
pci_dev in comedi_pci_auto_config() and passed down.


  reply	other threads:[~2012-03-19 22:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19  2:25 [PATCH] staging: comedi: resolve section mismatch in s626 Gerard Snitselaar
2012-03-19  3:09 ` [PATCH v2] " Gerard Snitselaar
2012-03-19 16:31   ` Greg KH
2012-03-19 16:43     ` Gerard Snitselaar
2012-03-19 22:46       ` Gerard Snitselaar [this message]
2012-03-19 23:26         ` Greg KH
2012-04-02 10:48           ` Ian Abbott
2012-04-10 18:24             ` Greg KH
2012-04-10 19:24               ` Gerard Snitselaar
2012-04-12 13:03               ` Ian Abbott
2012-04-18 23:28                 ` Greg KH
2012-04-20  1:34                   ` Gerard Snitselaar
2012-04-20 15:33                     ` Greg KH
2012-04-24  1:30                       ` [PATCH v2 resend] " Gerard Snitselaar

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=20120319224649.GA7679@perelman.Home \
    --to=dev@snitselaar.org \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=fmhess@users.sourceforge.net \
    --cc=gregkh@linuxfoundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.