All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Linux LED Subsystem <linux-leds@vger.kernel.org>,
	Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
	Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH] leds: start numerating duplicated devices from 2
Date: Thu, 26 Mar 2015 15:39:13 +0100	[thread overview]
Message-ID: <55141A11.3020703@samsung.com> (raw)
In-Reply-To: <CAPybu_2uPvZayywBuUbZ=JV7Fk5sBWeWqu3-AC35FcsA3kMXEg@mail.gmail.com>

Hi Ricardo,

On 03/26/2015 03:22 PM, Ricardo Ribalda Delgado wrote:
> Hello
>
> I thought real programmers count from zero :), Jokes aside, I think it
> is the convention in the kernel to start from 0 (video0, mmc0....)
>
> Also the patch is wrong, it will always show the info message "led
> renamed to...", becase led_classdev_register expects 0 when the device
> has not been renamed, with this patch you will return 1.
>
> Best Regards
>
> Nacked-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>

Oops, I didn't notice this :-/

Getting back to numeration - in the LED subsystem devices don't
get numerical suffixes, if they are not duplicated.

For V4L2 case every device name begins from 'video' so adding
the numbers from 0 is reasonable.

For LED subsystem having devices e.g. aat1290 and aat1290_1 would
be confusing IMO.


-- 
Best Regards,
Jacek Anaszewski

  reply	other threads:[~2015-03-26 14:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 14:03 [PATCH] DT: leds: Add uniqueness requirement for 'label' property Jacek Anaszewski
2015-03-26 14:03 ` [PATCH] leds: start numerating duplicated devices from 2 Jacek Anaszewski
2015-03-26 14:22   ` Ricardo Ribalda Delgado
2015-03-26 14:39     ` Jacek Anaszewski [this message]
2015-03-26 14:43       ` Ricardo Ribalda Delgado
2015-03-26 20:59 ` [PATCH] DT: leds: Add uniqueness requirement for 'label' property Sakari Ailus
2015-03-27  0:58   ` Bryan Wu

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=55141A11.3020703@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=ricardo.ribalda@gmail.com \
    --cc=rpurdie@rpsys.net \
    --cc=sakari.ailus@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.