From: Jaswinder Singh <jaswinder@infradead.org>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
dahinds@users.sourceforge.net, becker@scyld.com,
x-csrdh@jcu.edu.au, erik@vt.edu, Jeff Garzik <jeff@garzik.org>,
netdev <netdev@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] smc91c92_cs: use request_firmware
Date: Mon, 28 Jul 2008 14:32:54 +0530 [thread overview]
Message-ID: <1217235775.6407.3.camel@jaswinder.satnam> (raw)
In-Reply-To: <20080728082814.GA4708@isilmar.linta.de>
Hello Dominik,
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 <linux/mii.h>
#include <linux/jiffies.h>
#include <linux/firmware.h>
-#include <linux/platform_device.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
@@ -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
Thank you,
Jaswinder Singh.
next prev parent reply other threads:[~2008-07-28 9:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-27 14:52 [PATCH] smc91c92_cs: use request_firmware Jaswinder Singh
2008-07-28 8:28 ` Dominik Brodowski
2008-07-28 9:02 ` Jaswinder Singh [this message]
2008-07-28 9:07 ` Dominik Brodowski
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=1217235775.6407.3.camel@jaswinder.satnam \
--to=jaswinder@infradead.org \
--cc=becker@scyld.com \
--cc=dahinds@users.sourceforge.net \
--cc=dwmw2@infradead.org \
--cc=erik@vt.edu \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=netdev@vger.kernel.org \
--cc=x-csrdh@jcu.edu.au \
/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