Re: [patch-v2.6.32+ 3/8] usb: musb: get rid of musb->set_clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Dec 15, 2009 at 10:57:47AM +0100, ext Gupta, Ajay Kumar wrote:


-----Original Message-----
From: Felipe Balbi [mailto:felipe.balbi@xxxxxxxxx]
Sent: Tuesday, December 15, 2009 2:39 PM
To: Greg Kroah-Hartman
Cc: Linux USB Mailing List; David Brownell; Gadiyar, Anand; Gupta, Ajay
Kumar; Arnaud Mandy; Heikki Krogerus; Felipe Balbi
Subject: [patch-v2.6.32+ 3/8] usb: musb: get rid of musb->set_clock

... and use clk framework functions only.

Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx>
---
 drivers/usb/musb/musb_core.c |   12 +++---------
 drivers/usb/musb/musb_core.h |    2 --
 drivers/usb/musb/omap2430.c  |   10 ++--------
 drivers/usb/musb/tusb6010.c  |   16 ++++++----------
 4 files changed, 11 insertions(+), 29 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 6c65cf4..f5fadf7 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1907,7 +1907,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,
@@ -2159,11 +2158,9 @@ static int musb_suspend(struct device *dev)
 		 */
 	}

-	if (musb->set_clock)
-		musb->set_clock(musb->clock, 0);
-	else
-		clk_disable(musb->clock);
+	clk_disable(musb->clock);
 	spin_unlock_irqrestore(&musb->lock, flags);
+
 	return 0;
 }

@@ -2175,10 +2172,7 @@ static int musb_resume_noirq(struct device *dev)
 	if (!musb->clock)
 		return 0;

-	if (musb->set_clock)
-		musb->set_clock(musb->clock, 1);
-	else
-		clk_enable(musb->clock);
+	clk_enable(musb->clock);

 	/* for static cmos like DaVinci, register values were preserved
 	 * unless for some reason the whole soc powered down or the USB
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 2ac0e6f..4a43a32 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -394,8 +394,6 @@ struct musb {
 	u8 board_mode;		/* enum musb_mode */
 	int			(*board_set_power)(int state);

-	int			(*set_clock)(struct clk *clk, int is_active);
-

I don't see any patch to fix compilation error in arch/arm/mach-omap2/
usb-musb.c due to this removal.

Similarly it would cause compilation error in davinci and Blackfin if
They are using set_clock().

yeah, we have to agree with Tony, Kevin and Bryan who would care the arch/* changes. If it's ok that Greg takes those, I can cook the patch in a sec.

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux