1 --- a/drivers/cbus/tahvo-usb.c
2 +++ b/drivers/cbus/tahvo-usb.c
3 @@ -99,7 +99,7 @@ struct tahvo_usb {
7 -static struct platform_device tahvo_usb_device;
8 +static struct tahvo_usb *tahvo_usb_device;
11 * ---------------------------------------------------------------------------
12 @@ -114,8 +114,7 @@ static struct platform_device *tahvo_otg
14 static irqreturn_t omap_otg_irq(int irq, void *arg)
16 - struct platform_device *otg_dev = arg;
17 - struct tahvo_usb *tu = platform_get_drvdata(otg_dev);
18 + struct tahvo_usb *tu = arg;
21 otg_irq = omap_readw(OTG_IRQ_SRC);
22 @@ -201,12 +200,12 @@ static int __init omap_otg_probe(struct
24 return request_irq(tahvo_otg_dev->resource[1].start,
25 omap_otg_irq, IRQF_DISABLED, DRIVER_NAME,
30 static int __exit omap_otg_remove(struct platform_device *pdev)
32 - free_irq(tahvo_otg_dev->resource[1].start, &tahvo_usb_device);
33 + free_irq(tahvo_otg_dev->resource[1].start, tahvo_usb_device);
37 @@ -659,6 +658,7 @@ static int __init tahvo_usb_probe(struct
38 tu = kzalloc(sizeof(*tu), GFP_KERNEL);
41 + tahvo_usb_device = tu;
43 tu->pt_dev = container_of(dev, struct platform_device, dev);
45 @@ -682,6 +682,7 @@ static int __init tahvo_usb_probe(struct
46 (unsigned long) tu, "vbus_interrupt");
49 + tahvo_usb_device = NULL;
50 printk(KERN_ERR "Could not register Tahvo interrupt for VBUS\n");
53 @@ -708,6 +709,7 @@ static int __init tahvo_usb_probe(struct
54 ret = otg_set_transceiver(&tu->otg);
56 printk(KERN_ERR "Cannot register USB transceiver\n");
57 + tahvo_usb_device = NULL;
59 tahvo_free_irq(TAHVO_INT_VBUSON);
61 @@ -732,6 +734,8 @@ static int __exit tahvo_usb_remove(struc
63 device_remove_file(&pdev->dev, &dev_attr_otg_mode);
65 + tahvo_usb_device = NULL;