Skip to content

Commit

Permalink
platform-drivers: x86: Convert pmic to new irq_chip functions
Browse files Browse the repository at this point in the history
Old functions will go away soon. Remove the stray semicolons while at
it.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Feng Tang <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Alek Du <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Matthew Garrett committed Feb 7, 2011
1 parent 180e9d1 commit cb8e5e6
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions drivers/platform/x86/intel_pmic_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ static void pmic_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
1 << (offset - 16));
}

static int pmic_irq_type(unsigned irq, unsigned type)
static int pmic_irq_type(struct irq_data *data, unsigned type)
{
struct pmic_gpio *pg = get_irq_chip_data(irq);
u32 gpio = irq - pg->irq_base;
struct pmic_gpio *pg = irq_data_get_irq_chip_data(data);
u32 gpio = data->irq - pg->irq_base;
unsigned long flags;

if (gpio >= pg->chip.ngpio)
Expand All @@ -207,8 +207,6 @@ static int pmic_irq_type(unsigned irq, unsigned type)
return 0;
}



static int pmic_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{
struct pmic_gpio *pg = container_of(chip, struct pmic_gpio, chip);
Expand All @@ -217,19 +215,15 @@ static int pmic_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
}

/* the gpiointr register is read-clear, so just do nothing. */
static void pmic_irq_unmask(unsigned irq)
{
};
static void pmic_irq_unmask(struct irq_data *data) { }

static void pmic_irq_mask(unsigned irq)
{
};
static void pmic_irq_mask(struct irq_data *data) { }

static struct irq_chip pmic_irqchip = {
.name = "PMIC-GPIO",
.mask = pmic_irq_mask,
.unmask = pmic_irq_unmask,
.set_type = pmic_irq_type,
.irq_mask = pmic_irq_mask,
.irq_unmask = pmic_irq_unmask,
.irq_set_type = pmic_irq_type,
};

static void pmic_irq_handler(unsigned irq, struct irq_desc *desc)
Expand Down

0 comments on commit cb8e5e6

Please sign in to comment.