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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html