mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
gpio: aggregator: Use compound literal from the header
Instead of doing it in place, convert GPIO_LOOKUP_IDX() and GPIO_HOG() to be compund literals that's allow to use them as rvalue in assignments. Due to above conversion, use compound literal from the header in the gpio-aggregator.c. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
parent
deb631c401
commit
b2498cb87c
2 changed files with 3 additions and 4 deletions
|
@ -75,7 +75,7 @@ struct gpiod_hog {
|
|||
* gpiod_get_index()
|
||||
*/
|
||||
#define GPIO_LOOKUP_IDX(_key, _chip_hwnum, _con_id, _idx, _flags) \
|
||||
{ \
|
||||
(struct gpiod_lookup) { \
|
||||
.key = _key, \
|
||||
.chip_hwnum = _chip_hwnum, \
|
||||
.con_id = _con_id, \
|
||||
|
@ -87,7 +87,7 @@ struct gpiod_hog {
|
|||
* Simple definition of a single GPIO hog in an array.
|
||||
*/
|
||||
#define GPIO_HOG(_chip_label, _chip_hwnum, _line_name, _lflags, _dflags) \
|
||||
{ \
|
||||
(struct gpiod_hog) { \
|
||||
.chip_label = _chip_label, \
|
||||
.chip_hwnum = _chip_hwnum, \
|
||||
.line_name = _line_name, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue