Commit b34d2ad7 authored by Andy Shevchenko's avatar Andy Shevchenko

gpio: crystalcove: Use specific type and API for IRQ number

Use specific type and API for IRQ number in the callbacks.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 386cbe7f
...@@ -188,8 +188,9 @@ static int crystalcove_irq_type(struct irq_data *data, unsigned int type) ...@@ -188,8 +188,9 @@ static int crystalcove_irq_type(struct irq_data *data, unsigned int type)
{ {
struct crystalcove_gpio *cg = struct crystalcove_gpio *cg =
gpiochip_get_data(irq_data_get_irq_chip_data(data)); gpiochip_get_data(irq_data_get_irq_chip_data(data));
irq_hw_number_t hwirq = irqd_to_hwirq(data);
if (data->hwirq >= CRYSTALCOVE_GPIO_NUM) if (hwirq >= CRYSTALCOVE_GPIO_NUM)
return 0; return 0;
switch (type) { switch (type) {
...@@ -226,12 +227,12 @@ static void crystalcove_bus_sync_unlock(struct irq_data *data) ...@@ -226,12 +227,12 @@ static void crystalcove_bus_sync_unlock(struct irq_data *data)
{ {
struct crystalcove_gpio *cg = struct crystalcove_gpio *cg =
gpiochip_get_data(irq_data_get_irq_chip_data(data)); gpiochip_get_data(irq_data_get_irq_chip_data(data));
int gpio = data->hwirq; irq_hw_number_t hwirq = irqd_to_hwirq(data);
if (cg->update & UPDATE_IRQ_TYPE) if (cg->update & UPDATE_IRQ_TYPE)
crystalcove_update_irq_ctrl(cg, gpio); crystalcove_update_irq_ctrl(cg, hwirq);
if (cg->update & UPDATE_IRQ_MASK) if (cg->update & UPDATE_IRQ_MASK)
crystalcove_update_irq_mask(cg, gpio); crystalcove_update_irq_mask(cg, hwirq);
cg->update = 0; cg->update = 0;
mutex_unlock(&cg->buslock); mutex_unlock(&cg->buslock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment