[parisc-linux] Unregister driver patch
Grant Grundler
grundler@cup.hp.com
Sun, 25 Feb 2001 21:30:03 -0800
Hi Matthieu,
Ok. I lied. One more issue with the patch in register_pa_dev().
Matthieu Delahaye wrote:
> @@ -145,16 +187,16 @@
> {
> struct pa_iodc_driver *driver = pa_drivers;
>
> - while ((0 == hp_dev->managed) && (NULL != driver)) {
> + while ((NULL == hp_dev->driver) && (NULL != driver)) {
>
> if (compare_spec(hp_dev,driver))
> - hp_dev->managed =
> - ((*driver->callback)(hp_dev,driver) == 0);
> + hp_dev->driver =
> + (((*driver->callback)(hp_dev,driver) == 0)?driv
> er:NULL);
>
> driver = driver->next;
> }
>
> - return hp_dev->managed;
> + return (hp_dev->driver==driver);
In the case a device is managed, "driver" points to "->next" after
we exit the loop and we end up returning false. Right?
I think "return (NULL != hp_dev->driver)" is the correct code.
grant
Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253