Subject: Re: [PATCH] sc92031: sysfs link missing

From: Jeff Garzik <[email-masked]>
Date: Fri, 04 Apr 2008 02:40:17 -0400

Andrew Morton wrote:
> On Fri, 04 Apr 2008 01:46:05 -0400 Jeff Garzik <[email-masked]> wrote:
> 
>> Stephen Hemminger wrote:
>>> Add missing sysfs device association. Compile tested only -ENOHW.
>>>
>>> Signed-off-by: Stephen Hemminger <[email-masked]>
>>>
>>>
>>> --- a/drivers/net/sc92031.c	2008-04-02 09:34:35.000000000 -0700
>>> +++ b/drivers/net/sc92031.c	2008-04-02 09:36:53.000000000 -0700
>>> @@ -1446,6 +1446,7 @@ static int __devinit sc92031_probe(struc
>>>  	}
>>>  
>>>  	pci_set_drvdata(pdev, dev);
>>> +	SET_NETDEV_DEV(dev, &hw->pdev->dev);
>>>  
>>>  #if SC92031_USE_BAR == 0
>>>  	dev->mem_start = pci_resource_start(pdev, SC92031_USE_BAR);
>> applied
>>
> 
> That's version 1.  There was a super-optimised version 2:
> 
> 
> 
> From: Stephen Hemminger <[email-masked]>
> 
> Add missing sysfs device association. Compile tested only -ENOHW.
> 
> Addresses http://bugzilla.kernel.org/show_bug.cgi?id=10380
> 
> Signed-off-by: Stephen Hemminger <[email-masked]>
> Cc: Jeff Garzik <[email-masked]>
> Cc: Cesar Eduardo Barros <[email-masked]>
> Cc: <[email-masked]>
> Signed-off-by: Andrew Morton <[email-masked]>
> ---
> 
>  drivers/net/sc92031.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -puN drivers/net/sc92031.c~sc92031-sysfs-link-missing drivers/net/sc92031.c
> --- a/drivers/net/sc92031.c~sc92031-sysfs-link-missing
> +++ a/drivers/net/sc92031.c
> @@ -1446,6 +1446,7 @@ static int __devinit sc92031_probe(struc
>  	}
>  
>  	pci_set_drvdata(pdev, dev);
> +	SET_NETDEV_DEV(dev, &pdev->dev);
>  
>  #if SC92031_USE_BAR == 0
>  	dev->mem_start = pci_resource_start(pdev, SC92031_USE_BAR);

Thanks!

After I wrote "applied", compile testing kicked it out, so I dropped it 
from the batch sent to DaveM just now.

Not even compile tested apparently..

	Jeff