mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
sh-pfc: Rename struct sh_pfc nr_pins field to nr_gpio_pins
The field contains the number of pins with an associated GPIO port. This is currently equal to the total number of pins but will be modified when adding support for pins without a GPIO port. Rename the field accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
This commit is contained in:
parent
9689896cb1
commit
28818fa5da
@ -34,7 +34,7 @@ struct sh_pfc {
|
|||||||
unsigned int num_windows;
|
unsigned int num_windows;
|
||||||
struct sh_pfc_window *window;
|
struct sh_pfc_window *window;
|
||||||
|
|
||||||
unsigned int nr_pins;
|
unsigned int nr_gpio_pins;
|
||||||
|
|
||||||
struct sh_pfc_chip *gpio;
|
struct sh_pfc_chip *gpio;
|
||||||
struct sh_pfc_chip *func;
|
struct sh_pfc_chip *func;
|
||||||
|
@ -245,7 +245,7 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip)
|
|||||||
gc->dev = pfc->dev;
|
gc->dev = pfc->dev;
|
||||||
gc->owner = THIS_MODULE;
|
gc->owner = THIS_MODULE;
|
||||||
gc->base = 0;
|
gc->base = 0;
|
||||||
gc->ngpio = pfc->nr_pins;
|
gc->ngpio = pfc->nr_gpio_pins;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -293,7 +293,7 @@ static int gpio_function_setup(struct sh_pfc_chip *chip)
|
|||||||
|
|
||||||
gc->label = pfc->info->name;
|
gc->label = pfc->info->name;
|
||||||
gc->owner = THIS_MODULE;
|
gc->owner = THIS_MODULE;
|
||||||
gc->base = pfc->nr_pins;
|
gc->base = pfc->nr_gpio_pins;
|
||||||
gc->ngpio = pfc->info->nr_func_gpios;
|
gc->ngpio = pfc->info->nr_func_gpios;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -632,7 +632,7 @@ static int sh_pfc_map_pins(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pfc->nr_pins = ranges[nr_ranges-1].end + 1;
|
pfc->nr_gpio_pins = ranges[nr_ranges-1].end + 1;
|
||||||
|
|
||||||
return nr_ranges;
|
return nr_ranges;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user