Messages in this thread Patch in this message | | | Date | Sat, 7 Oct 2006 15:31:01 -0700 | From | "Om Narasimhan" <> | Subject | Re: [-mm PATCH] fixed PCMCIA au1000_generic.c |
| |
On 10/6/06, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote: > On Thu, 5 Oct 2006 23:18:44 -0700 > "Om Narasimhan" <om.turyx@gmail.com> wrote: > > > On 10/4/06, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote: > > > Hi, > > > > > Sorry for the late reply. > > > pcmcia-au1000_generic-fix.patch has a problem. > > > It needs more fix. > for (i = 0; i < nr; i++) { > struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i); <-- 1st skt definition > <snip> > ret = pcmcia_register_socket(&skt->socket); > if (ret) > goto out_err; > > WARN_ON(skt->socket.sock != i); > > add_timer(&skt->poll_timer); > } > <snip> > > out_err: > flush_scheduled_work(); > ops->hw_shutdown(skt); <-- skt undeclared I am sorry. I did not find this. Please find the corrected patch. Applies cleanly to 2.6.18-rc6, rc7, 2.6.18, and 2.6.19-rc1 Regards, Om.
drivers/pcmcia/au1000_generic.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index d5dd0ce..5387de6 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c @@ -351,6 +351,7 @@ struct skt_dev_info { int au1x00_pcmcia_socket_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) { struct skt_dev_info *sinfo; + struct au1000_pcmcia_socket *skt; int ret, i;
sinfo = kzalloc(sizeof(struct skt_dev_info), GFP_KERNEL); @@ -365,7 +366,7 @@ int au1x00_pcmcia_socket_probe(struct de * Initialise the per-socket structure. */ for (i = 0; i < nr; i++) { - struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i); + skt = PCMCIA_SOCKET(i); memset(skt, 0, sizeof(*skt));
skt->socket.resource_ops = &pccard_static_ops; @@ -438,17 +439,19 @@ #endif dev_set_drvdata(dev, sinfo); return 0;
- do { - struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i); + +out_err: + flush_scheduled_work(); + ops->hw_shutdown(skt); + while (i-- > 0) { + skt = PCMCIA_SOCKET(i);
del_timer_sync(&skt->poll_timer); pcmcia_unregister_socket(&skt->socket); -out_err: flush_scheduled_work(); ops->hw_shutdown(skt);
- i--; - } while (i > 0); + } kfree(sinfo); out: return ret; - 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/
| |