Skip to content

Commit 69da5aa

Browse files
William Breathitt Graybroonie
authored andcommitted
regmap-irq: Drop map from handle_mask_sync() parameters
Remove the map parameter from the struct regmap_irq_chip callback handle_mask_sync() because it can be passed via the irq_drv_data parameter instead. The gpio-104-dio-48e driver is the only consumer of this callback and is thus updated accordingly. Reviewed-by: Linus Walleij <linus.walleij@linaro.org Signed-off-by: William Breathitt Gray <william.gray@linaro.org Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com Link: https://lore.kernel.org/r/1f44fb0fbcd3dccea3371215b00f1b9a956c1a12.1679323449.git.william.gray@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
1 parent b5c506b commit 69da5aa

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

drivers/base/regmap/regmap-irq.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
116116
for (i = 0; i < d->chip->num_regs; i++) {
117117
if (d->mask_base) {
118118
if (d->chip->handle_mask_sync)
119-
d->chip->handle_mask_sync(d->map, i,
120-
d->mask_buf_def[i],
119+
d->chip->handle_mask_sync(i, d->mask_buf_def[i],
121120
d->mask_buf[i],
122121
d->chip->irq_drv_data);
123122
else {
@@ -920,7 +919,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
920919

921920
if (d->mask_base) {
922921
if (chip->handle_mask_sync) {
923-
ret = chip->handle_mask_sync(d->map, i,
922+
ret = chip->handle_mask_sync(i,
924923
d->mask_buf_def[i],
925924
d->mask_buf[i],
926925
chip->irq_drv_data);

drivers/gpio/gpio-104-dio-48e.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct dio48e_gpio {
110110
unsigned int irq_mask;
111111
};
112112

113-
static int dio48e_handle_mask_sync(struct regmap *const map, const int index,
113+
static int dio48e_handle_mask_sync(const int index,
114114
const unsigned int mask_buf_def,
115115
const unsigned int mask_buf,
116116
void *const irq_drv_data)

include/linux/regmap.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,8 +1658,7 @@ struct regmap_irq_chip {
16581658

16591659
int (*handle_pre_irq)(void *irq_drv_data);
16601660
int (*handle_post_irq)(void *irq_drv_data);
1661-
int (*handle_mask_sync)(struct regmap *map, int index,
1662-
unsigned int mask_buf_def,
1661+
int (*handle_mask_sync)(int index, unsigned int mask_buf_def,
16631662
unsigned int mask_buf, void *irq_drv_data);
16641663
int (*set_type_virt)(unsigned int **buf, unsigned int type,
16651664
unsigned long hwirq, int reg);

0 commit comments

Comments
 (0)