public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-kernel] Re: Linux 2.4.18-pre9
@ 2002-02-08  4:25 Jason Thomas
  2002-02-08  8:15 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Thomas @ 2002-02-08  4:25 UTC (permalink / raw)
  To: linux-kernel

> Jeff Garzik wrote:
> Simon Turvey wrote:
> > > Can you tell me if the final 2.4.18 will solve the problems with recent
> > binutils?  Or is the onus on the binutils maintainer to fix this?
>
> What driver are you having problems with?

how about bttv and usb-uhci, both of which I've sent patches for multiple times.

> 
> Typically this problem is solved by a one-line fix to a specific driver,
> in 2.4.x.
> 
> 	Jeff


diff -Naur linux-2.4.18-pre7-ac1.orig/drivers/media/video/bttv-driver.c linux-2.4.18-pre7-ac1/drivers/media/video/bttv-driver.c
--- linux-2.4.18-pre7-ac1.orig/drivers/media/video/bttv-driver.c	Sat Dec 22 13:39:39 2001
+++ linux-2.4.18-pre7-ac1/drivers/media/video/bttv-driver.c	Wed Jan 30 15:23:48 2002
@@ -2820,11 +2820,10 @@
  *	Scan for a Bt848 card, request the irq and map the io memory 
  */
 
-static void __devexit bttv_remove(struct pci_dev *pci_dev)
+static void bttv_remove_card(struct bttv *btv)
 {
         u8 command;
         int j;
-        struct bttv *btv = pci_get_drvdata(pci_dev);
 
 	if (bttv_verbose)
 		printk("bttv%d: unloading\n",btv->nr);
@@ -2890,10 +2889,18 @@
         btv->shutdown=1;
         wake_up(&btv->gpioq);
 
-	pci_set_drvdata(pci_dev, NULL);
         return;
 }
 
+static void __devexit bttv_remove(struct pci_dev *pci_dev)
+{
+        struct bttv *btv = pci_get_drvdata(pci_dev);
+		
+	if (btv) {
+		bttv_remove_card(btv);
+		pci_set_drvdata(pci_dev, NULL);
+	}
+}
 
 static int __devinit bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
 {
@@ -2992,7 +2999,7 @@
 	pci_set_drvdata(dev,btv);
 
 	if(init_bt848(btv) < 0) {
-		bttv_remove(dev);
+		bttv_remove_card(btv);
 		return -EIO;
 	}
 	bttv_num++;
diff -Naur linux-2.4.18-pre7-ac1.orig/drivers/usb/usb-uhci.c linux-2.4.18-pre7-ac1/drivers/usb/usb-uhci.c
--- linux-2.4.18-pre7-ac1.orig/drivers/usb/usb-uhci.c	Sat Dec 22 13:39:39 2001
+++ linux-2.4.18-pre7-ac1/drivers/usb/usb-uhci.c	Wed Jan 30 15:23:48 2002
@@ -2845,10 +2845,9 @@
 	s->running = 1;
 }
 
-_static void __devexit
-uhci_pci_remove (struct pci_dev *dev)
+_static void
+uhci_pci_remove_card (uhci_t *s)
 {
-	uhci_t *s = pci_get_drvdata(dev);
 	struct usb_device *root_hub = s->bus->root_hub;
 
 	s->running = 0;		    // Don't allow submit_urb
@@ -2868,7 +2867,17 @@
 	free_irq (s->irq, s);
 	usb_free_bus (s->bus);
 	cleanup_skel (s);
-	kfree (s);
+}
+
+_static void __devexit
+uhci_pci_remove (struct pci_dev *dev)
+{
+	uhci_t *s = pci_get_drvdata(dev);
+	
+	if (s) {
+		uhci_pci_remove_card(s);
+		kfree (s);
+	}
 }
 
 _static int __init uhci_start_usb (uhci_t *s)
@@ -3001,7 +3010,8 @@
 	s->irq = irq;
 
 	if(uhci_start_usb (s) < 0) {
-		uhci_pci_remove(dev);
+		uhci_pci_remove_card(s);
+		kfree(s);
 		return -1;
 	}
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Linux-kernel] Re: Linux 2.4.18-pre9
  2002-02-08  4:25 [Linux-kernel] Re: Linux 2.4.18-pre9 Jason Thomas
@ 2002-02-08  8:15 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2002-02-08  8:15 UTC (permalink / raw)
  To: Jason Thomas; +Cc: linux-kernel

On Fri, Feb 08, 2002 at 03:25:02PM +1100, Jason Thomas wrote:
> 
> how about bttv and usb-uhci, both of which I've sent patches for multiple times.

usb-uhci has been fixed.  Let me know if you still have problems with
2.4.18-pre9.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-08  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-08  4:25 [Linux-kernel] Re: Linux 2.4.18-pre9 Jason Thomas
2002-02-08  8:15 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox