lkml.org 
[lkml]   [2005]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-mm PATCH] remove use of pci_find_device in watchdog driver for Intel 6300ESB chipset
David Härdeman napsal(a):

> On Mon, Aug 15, 2005 at 02:30:15PM -0700, Naveen Gupta wrote:
> [...}
>
>> - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev))
>> != NULL) {
>> - if (pci_match_id(esb_pci_tbl, dev)) {
>> - esb_pci = dev;
>> - break;
>> - }
>> - }
>> + while (ids->vendor && ids->device) {
>> + if ((dev = pci_get_device(ids->vendor, ids->device, dev)) !=
>> NULL) {
>> + esb_pci = dev;
>> + break;
>> + }
>> + ids++;
>> + }
>
>
> I'm certainly not sure about this, but the proposed while loop looks a
> bit unconventional, wouldn't something like:
>
> for_each_pci_dev(dev)
> if (pci_match_id(esb_pci_tbl, dev)) {
> esb_pci = dev;
> break;
> }
> }
>
> be better?

I did it here http://lkml.org/lkml/2005/8/9/305, but it wasn't acked
yet. I should repost.

--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-16 02:22    [W:0.032 / U:9.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site