1 --- a/drivers/cbus/tahvo-usb.c
2 +++ b/drivers/cbus/tahvo-usb.c
3 @@ -98,6 +98,7 @@ struct tahvo_usb {
9 static struct tahvo_usb *tahvo_usb_device;
11 @@ -673,6 +674,14 @@ static int __init tahvo_usb_probe(struct
12 INIT_WORK(&tu->irq_work, tahvo_usb_irq_work);
13 mutex_init(&tu->serialize);
15 + tu->ick = clk_get(NULL, "usb_l4_ick");
16 + if (IS_ERR(tu->ick)) {
17 + dev_err(dev, "Failed to get usb_l4_ick\n");
18 + ret = PTR_ERR(tu->ick);
21 + clk_enable(tu->ick);
23 /* Set initial state, so that we generate kevents only on
25 tu->vbus_state = tahvo_read_reg(TAHVO_REG_IDSR) & 0x01;
26 @@ -681,10 +690,8 @@ static int __init tahvo_usb_probe(struct
27 ret = tahvo_request_irq(TAHVO_INT_VBUSON, tahvo_usb_vbus_interrupt,
28 (unsigned long) tu, "vbus_interrupt");
31 - tahvo_usb_device = NULL;
32 printk(KERN_ERR "Could not register Tahvo interrupt for VBUS\n");
34 + goto err_release_clk;
38 @@ -709,10 +716,7 @@ static int __init tahvo_usb_probe(struct
39 ret = otg_set_transceiver(&tu->otg);
41 printk(KERN_ERR "Cannot register USB transceiver\n");
42 - tahvo_usb_device = NULL;
44 - tahvo_free_irq(TAHVO_INT_VBUSON);
49 dev_set_drvdata(dev, tu);
50 @@ -721,6 +725,17 @@ static int __init tahvo_usb_probe(struct
51 * may not be generated in addition to this. */
52 schedule_work(&tu->irq_work);
56 + tahvo_free_irq(TAHVO_INT_VBUSON);
58 + clk_disable(tu->ick);
62 + tahvo_usb_device = NULL;
67 static int __exit tahvo_usb_remove(struct platform_device *pdev)
68 @@ -736,6 +751,8 @@ static int __exit tahvo_usb_remove(struc
70 device_remove_file(&pdev->dev, &dev_attr_otg_mode);
72 + clk_disable(tu->ick);
76 tahvo_usb_device = NULL;