lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 1 Feb 2016 14:20:17 +0100
From:	Stefan Wahren <stefan.wahren@...e.com>
To:	Jacek Anaszewski <j.anaszewski@...sung.com>
Cc:	Richard Purdie <rpurdie@...ys.net>,
	Rob Herring <robh+dt@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-leds@...r.kernel.org
Subject: Re: [PATCH 3/3] leds: add SN3218 LED driver

Am 01.02.2016 um 13:53 schrieb Jacek Anaszewski:
> On 02/01/2016 10:58 AM, Jacek Anaszewski wrote:
>> Hi Stefan,
>>
>> Thanks for the update. A few more comments below.
>>
>> On 01/31/2016 01:59 PM, Stefan Wahren wrote:
>>> +
>>> +/**
>>> + * struct sn3218 -
>>> + * @client - Pointer to the I2C client
>>> + * @leds - Pointer to the individual LEDs
>>> + * @num_leds - Actual number of LEDs
>>> +**/
>>> +struct sn3218 {
>>> +    struct i2c_client *client;
>>> +    struct regmap *regmap;
>>> +    struct sn3218_led *leds;
>>> +    int num_leds;
>>> +};
>>> +
>>> +/**
>>> + * struct sn3218_led -
>>> + * @chip - Pointer to the container
>>> + * @led_cdev - led class device pointer
>>> + * @led_num - LED index ( 0 .. 17 )
>>> +**/
>>> +struct sn3218_led {
>>> +    struct sn3218 *chip;
>>
>> You don't need this if you have led id here. Please refer to
>> drivers/leds/leds-max77693.c, sub_led_to_led() to check how to get
>> a pointer to the parent structure in similar case.
>
> Hmm, it would work only if leds was a static array in struct sn3218.
> So, let's better leave this "chip" pointer intact.

Okay

I will wait until the end of the week before sending a new version.

Thanks
Stefan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ