mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:30:52 +07:00
mfd: rdc321x: Fix off-by-one for ngpio setting
The valid gpio is GPIO0 ~ GPIO58, so ngpio should be 59. This patch also renames RDC321X_MAX_GPIO to RDC321X_NUM_GPIO because it actually means the number of available GPIOs. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
51f1f1cb24
commit
1ec93b9b17
@ -38,7 +38,7 @@ static struct resource rdc321x_wdt_resource[] = {
|
||||
};
|
||||
|
||||
static struct rdc321x_gpio_pdata rdc321x_gpio_pdata = {
|
||||
.max_gpios = RDC321X_MAX_GPIO,
|
||||
.max_gpios = RDC321X_NUM_GPIO,
|
||||
};
|
||||
|
||||
static struct resource rdc321x_gpio_resources[] = {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define RDC321X_GPIO_CTRL_REG2 0x84
|
||||
#define RDC321X_GPIO_DATA_REG2 0x88
|
||||
|
||||
#define RDC321X_MAX_GPIO 58
|
||||
#define RDC321X_NUM_GPIO 59
|
||||
|
||||
struct rdc321x_gpio_pdata {
|
||||
struct pci_dev *sb_pdev;
|
||||
|
Loading…
Reference in New Issue
Block a user