+ atmel_pwm-set-up-only-one-pwm-clock-when-allocating-a-clock.patch added to -mm tree

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

 



The patch titled
     atmel_pwm: set up only one PWM clock when allocating a clock
has been added to the -mm tree.  Its filename is
     atmel_pwm-set-up-only-one-pwm-clock-when-allocating-a-clock.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: atmel_pwm: set up only one PWM clock when allocating a clock
From: Hans-Christian Egtvedt <hans-christian.egtvedt@xxxxxxxxx>

This patch will only setup one clock, if free, and return this clock to the
caller.  The previous solution would setup both clocks with the same prescaler
and divider and return PWM_CPR_CLKB, thus taking both clocks in the same call
without the caller knowing.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@xxxxxxxxx>
Cc: David Brownell <david-b@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/misc/atmel_pwm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/misc/atmel_pwm.c~atmel_pwm-set-up-only-one-pwm-clock-when-allocating-a-clock drivers/misc/atmel_pwm.c
--- a/drivers/misc/atmel_pwm.c~atmel_pwm-set-up-only-one-pwm-clock-when-allocating-a-clock
+++ a/drivers/misc/atmel_pwm.c
@@ -211,8 +211,7 @@ int pwm_clk_alloc(unsigned prescale, uns
 	if ((mr & 0xffff) == 0) {
 		mr |= val;
 		ret = PWM_CPR_CLKA;
-	}
-	if ((mr & (0xffff << 16)) == 0) {
+	} else if ((mr & (0xffff << 16)) == 0) {
 		mr |= val << 16;
 		ret = PWM_CPR_CLKB;
 	}
_

Patches currently in -mm which might be from hans-christian.egtvedt@xxxxxxxxx are

linux-next.patch
atmel_pwm-set-up-only-one-pwm-clock-when-allocating-a-clock.patch
fbdev-lcd-backlight-driver-using-atmel-pwm-driver.patch

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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux