Hello.
Felipe Balbi wrote:
get rid of the set_clock hackery.
Cc: linux-usb@xxxxxxxxxxxxxxx
Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
---
Greg, I'll send this patch to you shortly, it's
only here so that Tony can have it in linux-omap-2.6
to avoid breaking any of his boards.
Er, I'm afraid I have to NAK this patch...
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 5eb9318..37ca87d 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -977,10 +977,8 @@ static void musb_shutdown(struct platform_device *pdev)
spin_lock_irqsave(&musb->lock, flags);
musb_platform_disable(musb);
musb_generic_disable(musb);
- if (musb->clock) {
- clk_put(musb->clock);
- musb->clock = NULL;
- }
+ clk_put(musb->clock);
+ musb->clock = NULL;
spin_unlock_irqrestore(&musb->lock, flags);
/* FIXME power down */
@@ -1864,10 +1862,8 @@ static void musb_free(struct musb *musb)
musb_platform_exit(musb);
musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
- if (musb->clock) {
- clk_disable(musb->clock);
- clk_put(musb->clock);
- }
+ clk_disable(musb->clock);
+ clk_put(musb->clock);
#ifdef CONFIG_USB_MUSB_HDRC_HCD
usb_put_hcd(musb_to_hcd(musb));
@@ -1930,7 +1926,6 @@ bad_config:
spin_lock_init(&musb->lock);
musb->board_mode = plat->mode;
musb->board_set_power = plat->set_power;
- musb->set_clock = plat->set_clock;
musb->min_power = plat->min_power;
/* Clock usage is chip-specific ... functional clock (DaVinci,
@@ -1938,15 +1933,17 @@ bad_config:
* code does is make sure a clock handle is available; platform
* code manages it during start/stop and suspend/resume.
*/
- if (plat->clock) {
- musb->clock = clk_get(dev, plat->clock);
- if (IS_ERR(musb->clock)) {
- status = PTR_ERR(musb->clock);
- musb->clock = NULL;
- goto fail;
- }
+ musb->clock = clk_get(dev, "ick");
Why always "ick"?! Do you think OMAPs are the only boards using MUSB
out there?
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html