equal
deleted
inserted
replaced
142 ret = gpiochip_add(&gpio->chip); |
142 ret = gpiochip_add(&gpio->chip); |
143 if (ret) { |
143 if (ret) { |
144 kfree(gpio); |
144 kfree(gpio); |
145 return ret; |
145 return ret; |
146 } |
146 } |
147 pr_info("registered %s as gpio chip with #%d GPIOs.\n", |
147 pr_info("registered %s as gpiochip%d with #%d GPIOs.\n", |
148 gpio->chip.label, gpio->chip.ngpio); |
148 gpio->chip.label, gpio->chip.base, gpio->chip.ngpio); |
149 func->private_data = gpio; |
149 func->private_data = gpio; |
150 return 0; |
150 return 0; |
151 } |
151 } |
152 |
152 |
153 static void ccat_gpio_remove(struct ccat_function *func) |
153 static void ccat_gpio_remove(struct ccat_function *func) |
155 struct ccat_gpio *const gpio = func->private_data; |
155 struct ccat_gpio *const gpio = func->private_data; |
156 |
156 |
157 gpiochip_remove(&gpio->chip); |
157 gpiochip_remove(&gpio->chip); |
158 }; |
158 }; |
159 |
159 |
160 struct ccat_driver gpio_driver = { |
160 const struct ccat_driver gpio_driver = { |
161 .type = CCATINFO_GPIO, |
161 .type = CCATINFO_GPIO, |
162 .probe = ccat_gpio_probe, |
162 .probe = ccat_gpio_probe, |
163 .remove = ccat_gpio_remove, |
163 .remove = ccat_gpio_remove, |
164 }; |
164 }; |