1. 20 Oct, 2014 1 commit
  2. 25 Sep, 2014 1 commit
  3. 29 Aug, 2014 1 commit
    • Geert Uytterhoeven's avatar
      pwm: Fix uninitialized warnings in pwm_get() · 70145f87
      Geert Uytterhoeven authored
      With some versions of gcc (e.g. 4.1.2):
      
      drivers/pwm/core.c: In function ‘pwm_get’:
      drivers/pwm/core.c:610: warning: ‘polarity’ may be used uninitialized in this function
      drivers/pwm/core.c:609: warning: ‘period’ may be used uninitialized in this function
      
      While these are false positives, we can get rid of them by refactoring
      the code to store a pointer to the best match, as suggested before by
      Thierry Reding. This does require moving the mutex_unlock() down.
      
      Fixes: d717ea73 ("pwm: Fix period and polarity in pwm_get() for non-perfect matches")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      70145f87
  4. 26 Aug, 2014 1 commit
  5. 25 Aug, 2014 6 commits
  6. 22 Aug, 2014 5 commits
  7. 20 Aug, 2014 3 commits
  8. 18 Aug, 2014 1 commit
    • Geert Uytterhoeven's avatar
      pwm: Fix period and polarity in pwm_get() for non-perfect matches · d717ea73
      Geert Uytterhoeven authored
      If pwm_get() finds a look-up entry with a perfect match (both dev_id and
      con_id match), the loop is aborted, and "p" still points to the correct
      struct pwm_lookup.
      
      If only an entry with a matching dev_id or con_id is found, the loop
      terminates after traversing the whole list, and "p" now points to
      arbitrary memory, not part of the pwm_lookup list.
      Then pwm_set_period() and pwm_set_polarity() will set random values for
      period resp. polarity.
      
      To fix this, save period and polarity when finding a new best match,
      just like is done for chip (for the provider) and index.
      
      This fixes the LCD backlight on r8a7740/armadillo-legacy, which was fed
      period 0 and polarity -1068821144 instead of 33333 resp. 1.
      
      Fixes: 3796ce1d ("pwm: add period and polarity to struct pwm_lookup")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      d717ea73
  9. 16 Aug, 2014 21 commits