lkml.org 
[lkml]   [2003]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Re: stuff-up in pcmcia/cardbus stuff
Dominik Brodowski wrote:
> Indeed. socket->pcmcia_socket (old) == socket->cls_d.s_info[0] (new)

If this is true...

> @@ -230,14 +230,16 @@
> static int cardbus_suspend (struct pci_dev *dev, u32 state)
> {
> pci_socket_t *socket = pci_get_drvdata(dev);
> - pcmcia_suspend_socket (socket->pcmcia_socket);
> + if (socket && socket->cls_d.s_info[0])
> + pcmcia_suspend_socket (socket->cls_d.s_info[0]);
> return 0;
> }
>
> static int cardbus_resume (struct pci_dev *dev)
> {
> pci_socket_t *socket = pci_get_drvdata(dev);
> - pcmcia_resume_socket (socket->pcmcia_socket);
> + if (socket && socket->cls_d.s_info[0])
> + pcmcia_resume_socket (socket->cls_d.s_info[0]);
> return 0;
> }


1) ...why do you bother checking for NULL? Isn't NULL indicative of a
BUG(), instead?

2) why are multiple s_info records allocated, when you hardcode use of
record #0 ?

Jeff



-
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-03-22 13:33    [W:0.049 / U:3.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site