lkml.org 
[lkml]   [2010]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRE: [PWM PATCH 1/5] API to consolidate PWM devices behind a common user and kernel interface
    Date
    From
    On Tuesday, February 02, 2010 12:15 AM, Bill Gatliff wrote:
    > Signed-off-by: Bill Gatliff <bgat@billgatliff.com>
    > ---
    > Documentation/pwm.txt | 260 +++++++++++++++++++
    > drivers/pwm/pwm.c | 633 +++++++++++++++++++++++++++++++++++++++++++++++
    > include/linux/pwm.h | 31 ---
    > include/linux/pwm/pwm.h | 170 +++++++++++++
    > 4 files changed, 1063 insertions(+), 31 deletions(-)
    > create mode 100644 Documentation/pwm.txt
    > create mode 100644 drivers/pwm/pwm.c
    > delete mode 100644 include/linux/pwm.h
    > create mode 100644 include/linux/pwm/pwm.h

    A couple quick comments, more after a better review.

    [snip]

    > diff --git a/drivers/pwm/pwm.c b/drivers/pwm/pwm.c
    > new file mode 100644
    > index 0000000..f369384
    > --- /dev/null
    > +++ b/drivers/pwm/pwm.c

    [snip]

    > +int pwm_unregister(struct pwm_device *pwm)
    > +{

    [snip]

    > + for (wchan = 0; wchan < pwm->nchan; wchan++) {
    > + if (pwm->channels[wchan].flags & FLAG_REQUESTED) {

    Shouldn't this be:

    & BIT(FLAG_REQUESTED)

    [snip]

    > diff --git a/include/linux/pwm/pwm.h b/include/linux/pwm/pwm.h
    > new file mode 100644
    > index 0000000..848cd76
    > --- /dev/null
    > +++ b/include/linux/pwm/pwm.h
    > @@ -0,0 +1,170 @@
    > +#ifndef __LINUX_PWM_H
    > +#define __LINUX_PWM_H

    Nitpick... Can you move the #ifndef/#define to after the comment?

    Regards,
    Hartley


    \
     
     \ /
      Last update: 2010-02-02 19:23    [W:0.024 / U:29.576 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site