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:55:47.177917578 +0100
4 +++ linux-2.6.38-rc7/drivers/cbus/tahvo-usb.c 2011-03-09 18:58:35.869996276 +0100
5 @@ -98,6 +98,7 @@ struct tahvo_usb {
11 static struct tahvo_usb *tahvo_usb_device;
13 @@ -673,6 +674,14 @@ static int __init tahvo_usb_probe(struct
14 INIT_WORK(&tu->irq_work, tahvo_usb_irq_work);
15 mutex_init(&tu->serialize);
17 + tu->ick = clk_get(NULL, "usb_l4_ick");
18 + if (IS_ERR(tu->ick)) {
19 + dev_err(dev, "Failed to get usb_l4_ick\n");
20 + ret = PTR_ERR(tu->ick);
23 + clk_enable(tu->ick);
25 /* Set initial state, so that we generate kevents only on
27 tu->vbus_state = tahvo_read_reg(TAHVO_REG_IDSR) & 0x01;
28 @@ -681,10 +690,8 @@ static int __init tahvo_usb_probe(struct
29 ret = tahvo_request_irq(TAHVO_INT_VBUSON, tahvo_usb_vbus_interrupt,
30 (unsigned long) tu, "vbus_interrupt");
33 - tahvo_usb_device = NULL;
34 printk(KERN_ERR "Could not register Tahvo interrupt for VBUS\n");
36 + goto err_release_clk;
40 @@ -709,10 +716,7 @@ static int __init tahvo_usb_probe(struct
41 ret = otg_set_transceiver(&tu->otg);
43 printk(KERN_ERR "Cannot register USB transceiver\n");
44 - tahvo_usb_device = NULL;
46 - tahvo_free_irq(TAHVO_INT_VBUSON);
51 dev_set_drvdata(dev, tu);
52 @@ -721,6 +725,17 @@ static int __init tahvo_usb_probe(struct
53 * may not be generated in addition to this. */
54 schedule_work(&tu->irq_work);
58 + tahvo_free_irq(TAHVO_INT_VBUSON);
60 + clk_disable(tu->ick);
64 + tahvo_usb_device = NULL;
69 static int __exit tahvo_usb_remove(struct platform_device *pdev)
70 @@ -736,6 +751,8 @@ static int __exit tahvo_usb_remove(struc
72 device_remove_file(&pdev->dev, &dev_attr_otg_mode);
74 + clk_disable(tu->ick);
78 tahvo_usb_device = NULL;