Skip to content

Commit b34d2ad

Browse files
committed
gpio: crystalcove: Use specific type and API for IRQ number
Use specific type and API for IRQ number in the callbacks. Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 386cbe7 commit b34d2ad

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/gpio/gpio-crystalcove.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ static int crystalcove_irq_type(struct irq_data *data, unsigned int type)
188188
{
189189
struct crystalcove_gpio *cg =
190190
gpiochip_get_data(irq_data_get_irq_chip_data(data));
191+
irq_hw_number_t hwirq = irqd_to_hwirq(data);
191192

192-
if (data->hwirq >= CRYSTALCOVE_GPIO_NUM)
193+
if (hwirq >= CRYSTALCOVE_GPIO_NUM)
193194
return 0;
194195

195196
switch (type) {
@@ -226,12 +227,12 @@ static void crystalcove_bus_sync_unlock(struct irq_data *data)
226227
{
227228
struct crystalcove_gpio *cg =
228229
gpiochip_get_data(irq_data_get_irq_chip_data(data));
229-
int gpio = data->hwirq;
230+
irq_hw_number_t hwirq = irqd_to_hwirq(data);
230231

231232
if (cg->update & UPDATE_IRQ_TYPE)
232-
crystalcove_update_irq_ctrl(cg, gpio);
233+
crystalcove_update_irq_ctrl(cg, hwirq);
233234
if (cg->update & UPDATE_IRQ_MASK)
234-
crystalcove_update_irq_mask(cg, gpio);
235+
crystalcove_update_irq_mask(cg, hwirq);
235236
cg->update = 0;
236237

237238
mutex_unlock(&cg->buslock);

0 commit comments

Comments
 (0)