Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755207AbYG1JIP (ORCPT ); Mon, 28 Jul 2008 05:08:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752015AbYG1JH4 (ORCPT ); Mon, 28 Jul 2008 05:07:56 -0400 Received: from isilmar.linta.de ([213.133.102.198]:60401 "EHLO linta.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751987AbYG1JHz (ORCPT ); Mon, 28 Jul 2008 05:07:55 -0400 Date: Mon, 28 Jul 2008 11:07:53 +0200 From: Dominik Brodowski To: Jaswinder Singh Cc: LKML , dahinds@users.sourceforge.net, becker@scyld.com, x-csrdh@jcu.edu.au, erik@vt.edu, Jeff Garzik , netdev , David Woodhouse Subject: Re: [PATCH] smc91c92_cs: use request_firmware Message-ID: <20080728090753.GA12080@isilmar.linta.de> Mail-Followup-To: Dominik Brodowski , Jaswinder Singh , LKML , dahinds@users.sourceforge.net, becker@scyld.com, x-csrdh@jcu.edu.au, erik@vt.edu, Jeff Garzik , netdev , David Woodhouse References: <1217170341.3537.9.camel@jaswinder.satnam> <20080728082814.GA4708@isilmar.linta.de> <1217235775.6407.3.camel@jaswinder.satnam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1217235775.6407.3.camel@jaswinder.satnam> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2215 Lines: 69 Hi, On Mon, Jul 28, 2008 at 02:32:54PM +0530, Jaswinder Singh wrote: > On Mon, 2008-07-28 at 10:28 +0200, Dominik Brodowski wrote: > > > +static int osi_load_firmware(struct pcmcia_device *link) > > > +{ > > > + struct platform_device *pdev; > > > + const struct firmware *fw; > > > + const char fw_name[] = "ositech/Xilinx7OD.bin"; > > > + int i, err; > > > + > > > + pdev = platform_device_register_simple("ositech", 0, NULL, 0); > > > > Why do we need a platform_device here? Can't we just use the pcmcia device > > (so &link->dev) here? > > > > Thanks for pointing it out, I was searching for it. > > Here is the fix: > > diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c > index 03f9be9..43d8e23 100644 > --- a/drivers/net/pcmcia/smc91c92_cs.c > +++ b/drivers/net/pcmcia/smc91c92_cs.c > @@ -43,7 +43,6 @@ > #include > #include > #include > -#include > > #include > #include > @@ -794,18 +793,11 @@ static int osi_config(struct pcmcia_device *link) > > static int osi_load_firmware(struct pcmcia_device *link) > { > - struct platform_device *pdev; > const struct firmware *fw; > const char fw_name[] = "ositech/Xilinx7OD.bin"; > int i, err; > > - pdev = platform_device_register_simple("ositech", 0, NULL, 0); > - if (IS_ERR(pdev)) { > - printk(KERN_ERR "Failed to register platform device ositech\n"); > - return IS_ERR(pdev); > - } > - err = request_firmware(&fw, fw_name, &pdev->dev); > - platform_device_unregister(pdev); > + err = request_firmware(&fw, fw_name, &link->dev); > if (err) { > printk(KERN_ERR "Failed to load firmware \"%s\"\n", > fw_name); > > You can check updated patch from :- > > http://git.infradead.org/users/jaswinder/firm-jsr-2.6.git for the pcmcia aspects of this patch: Acked-by: Dominik Brodowski Thanks! Dominik -- 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/