1 Index: linux-2.6.38-rc7/drivers/cbus/tahvo-usb.c
2 ===================================================================
3 --- linux-2.6.38-rc7.orig/drivers/cbus/tahvo-usb.c 2011-03-09 18:47:41.147540155 +0100
4 +++ linux-2.6.38-rc7/drivers/cbus/tahvo-usb.c 2011-03-09 18:50:59.658485748 +0100
5 @@ -99,7 +99,7 @@ struct tahvo_usb {
9 -static struct platform_device tahvo_usb_device;
10 +static struct tahvo_usb *tahvo_usb_device;
13 * ---------------------------------------------------------------------------
14 @@ -114,8 +114,7 @@ static struct platform_device *tahvo_otg
16 static irqreturn_t omap_otg_irq(int irq, void *arg)
18 - struct platform_device *otg_dev = arg;
19 - struct tahvo_usb *tu = platform_get_drvdata(otg_dev);
20 + struct tahvo_usb *tu = arg;
23 otg_irq = omap_readw(OTG_IRQ_SRC);
24 @@ -201,12 +200,12 @@ static int __init omap_otg_probe(struct
26 return request_irq(tahvo_otg_dev->resource[1].start,
27 omap_otg_irq, IRQF_DISABLED, DRIVER_NAME,
32 static int __exit omap_otg_remove(struct platform_device *pdev)
34 - free_irq(tahvo_otg_dev->resource[1].start, &tahvo_usb_device);
35 + free_irq(tahvo_otg_dev->resource[1].start, tahvo_usb_device);
39 @@ -659,6 +658,7 @@ static int __init tahvo_usb_probe(struct
40 tu = kzalloc(sizeof(*tu), GFP_KERNEL);
43 + tahvo_usb_device = tu;
45 tu->pt_dev = container_of(dev, struct platform_device, dev);
47 @@ -682,6 +682,7 @@ static int __init tahvo_usb_probe(struct
48 (unsigned long) tu, "vbus_interrupt");
51 + tahvo_usb_device = NULL;
52 printk(KERN_ERR "Could not register Tahvo interrupt for VBUS\n");
55 @@ -708,6 +709,7 @@ static int __init tahvo_usb_probe(struct
56 ret = otg_set_transceiver(&tu->otg);
58 printk(KERN_ERR "Cannot register USB transceiver\n");
59 + tahvo_usb_device = NULL;
61 tahvo_free_irq(TAHVO_INT_VBUSON);
63 @@ -732,6 +734,8 @@ static int __exit tahvo_usb_remove(struc
65 device_remove_file(&pdev->dev, &dev_attr_otg_mode);
67 + tahvo_usb_device = NULL;