mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@linux.intel.com>
To: Felipe Balbi <me@felipebalbi.com>
Cc: linux-kernel@vger.kernel.org,
	Felipe Balbi <felipe.balbi@nokia.com>,
	Anton Vorontsov <cbou@mail.ru>,
	David Woodhouse <dwmw2@infradead.org>, Greg KH <greg@kroah.com>,
	Pierre Ossman <drzeus@drzeus.cx>
Subject: Re: [PATCH] led: simplify led_trigger_register_simple
Date: Thu, 13 Nov 2008 12:38:32 +0000	[thread overview]
Message-ID: <1226579912.5402.21.camel@dax.rpnet.com> (raw)
In-Reply-To: <1226545753-6640-1-git-send-email-me@felipebalbi.com>

On Thu, 2008-11-13 at 05:09 +0200, Felipe Balbi wrote:
> From: Felipe Balbi <felipe.balbi@nokia.com>
> 
> We can make led_trigger_register_simple by returning a
> struct led_trigger *, instead of passing a struct led_trigger **
> as a parameter and changing it inside the function.

This misses the whole point that it was intentionally written that way.

> Note that I could only test ide, power_supply and mmc changes with my laptop.
> The other changes weren't tested.
> 
>  drivers/leds/led-triggers.c         |   25 ++++++++++++++---------
>  drivers/leds/ledtrig-ide-disk.c     |    6 ++++-
>  drivers/mmc/core/host.c             |    4 ++-
>  drivers/mtd/nand/nand_base.c        |    5 +++-
>  drivers/power/power_supply_leds.c   |   36 ++++++++++++++++++++++++++++------
>  drivers/staging/at76_usb/at76_usb.c |    6 ++++-
>  include/linux/leds.h                |    5 +--
>  7 files changed, 63 insertions(+), 24 deletions(-)

The simple triggers were designed to cause minimum interference to the
usually external subsystem code they were added into. As an example this
meant things like errors were just handled gracefully with a printk
warning and did not take down the whole subsystem. I therefore don't
regard this patch as a simplification, more a complication.

Regards,

Richard





  parent reply	other threads:[~2008-11-13 12:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13  3:09 Felipe Balbi
2008-11-13 12:03 ` Anton Vorontsov
2008-11-13 12:38 ` Richard Purdie [this message]
2008-11-13 18:14   ` Felipe Balbi
2008-11-13 19:10     ` Felipe Balbi
2008-11-20 13:10       ` Felipe Balbi
2008-11-20 13:33       ` Richard Purdie
2008-11-20 14:14         ` Felipe Balbi
2008-11-20 14:45           ` Richard Purdie
2008-11-20 15:01             ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1226579912.5402.21.camel@dax.rpnet.com \
    --to=rpurdie@linux.intel.com \
    --cc=cbou@mail.ru \
    --cc=drzeus@drzeus.cx \
    --cc=dwmw2@infradead.org \
    --cc=felipe.balbi@nokia.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@felipebalbi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®