From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757352Ab1LNPaK (ORCPT ); Wed, 14 Dec 2011 10:30:10 -0500 Received: from mail-yx0-f174.google.com ([209.85.213.174]:36263 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754327Ab1LNPaH (ORCPT ); Wed, 14 Dec 2011 10:30:07 -0500 From: Rob Herring To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org Cc: Grant Likely , shawn.guo@freescale.com, Kukjin Kim , Kevin Hilman , Tony Lindgren , Barry Song , Linus Walleij , Rob Herring Subject: [PATCH 5/9] gpio: pl061: convert to use 0 for no irq Date: Wed, 14 Dec 2011 09:28:54 -0600 Message-Id: <1323876538-20406-6-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1323876538-20406-1-git-send-email-robherring2@gmail.com> References: <1323876538-20406-1-git-send-email-robherring2@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Herring We don't want drivers using NO_IRQ, so remove its use. For now, 0 or -1 means no irq until platforms are converted to use 0. Signed-off-by: Rob Herring Cc: Grant Likely Cc: Linus Walleij --- drivers/gpio/gpio-pl061.c | 8 ++++---- include/linux/amba/pl061.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c index 0f718f9..fe19dec 100644 --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@ -53,7 +53,7 @@ struct pl061_gpio { spinlock_t irq_lock; /* IRQ registers */ void __iomem *base; - unsigned irq_base; + int irq_base; struct gpio_chip gc; }; @@ -119,7 +119,7 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset) { struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); - if (chip->irq_base == NO_IRQ) + if (chip->irq_base <= 0) return -EINVAL; return chip->irq_base + offset; @@ -250,7 +250,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) chip->irq_base = pdata->irq_base; } else if (dev->dev.of_node) { chip->gc.base = -1; - chip->irq_base = NO_IRQ; + chip->irq_base = 0; } else { ret = -ENODEV; goto free_mem; @@ -290,7 +290,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) * irq_chip support */ - if (chip->irq_base == NO_IRQ) + if (chip->irq_base <= 0) return 0; writeb(0, chip->base + GPIOIE); /* disable irqs */ diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index 2412af9..fb83c04 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h @@ -7,7 +7,7 @@ struct pl061_platform_data { unsigned gpio_base; /* number of the first IRQ. - * If the IRQ functionality in not desired this must be set to NO_IRQ. + * If the IRQ functionality in not desired this must be set to 0. */ unsigned irq_base; -- 1.7.5.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: [PATCH 5/9] gpio: pl061: convert to use 0 for no irq Date: Wed, 14 Dec 2011 09:28:54 -0600 Message-ID: <1323876538-20406-6-git-send-email-robherring2@gmail.com> References: <1323876538-20406-1-git-send-email-robherring2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1323876538-20406-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Cc: Kevin Hilman , Kukjin Kim , Tony Lindgren , Linus Walleij , Rob Herring , Barry Song List-Id: devicetree@vger.kernel.org From: Rob Herring We don't want drivers using NO_IRQ, so remove its use. For now, 0 or -1 means no irq until platforms are converted to use 0. Signed-off-by: Rob Herring Cc: Grant Likely Cc: Linus Walleij --- drivers/gpio/gpio-pl061.c | 8 ++++---- include/linux/amba/pl061.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c index 0f718f9..fe19dec 100644 --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@ -53,7 +53,7 @@ struct pl061_gpio { spinlock_t irq_lock; /* IRQ registers */ void __iomem *base; - unsigned irq_base; + int irq_base; struct gpio_chip gc; }; @@ -119,7 +119,7 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset) { struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); - if (chip->irq_base == NO_IRQ) + if (chip->irq_base <= 0) return -EINVAL; return chip->irq_base + offset; @@ -250,7 +250,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) chip->irq_base = pdata->irq_base; } else if (dev->dev.of_node) { chip->gc.base = -1; - chip->irq_base = NO_IRQ; + chip->irq_base = 0; } else { ret = -ENODEV; goto free_mem; @@ -290,7 +290,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) * irq_chip support */ - if (chip->irq_base == NO_IRQ) + if (chip->irq_base <= 0) return 0; writeb(0, chip->base + GPIOIE); /* disable irqs */ diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index 2412af9..fb83c04 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h @@ -7,7 +7,7 @@ struct pl061_platform_data { unsigned gpio_base; /* number of the first IRQ. - * If the IRQ functionality in not desired this must be set to NO_IRQ. + * If the IRQ functionality in not desired this must be set to 0. */ unsigned irq_base; -- 1.7.5.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: robherring2@gmail.com (Rob Herring) Date: Wed, 14 Dec 2011 09:28:54 -0600 Subject: [PATCH 5/9] gpio: pl061: convert to use 0 for no irq In-Reply-To: <1323876538-20406-1-git-send-email-robherring2@gmail.com> References: <1323876538-20406-1-git-send-email-robherring2@gmail.com> Message-ID: <1323876538-20406-6-git-send-email-robherring2@gmail.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org From: Rob Herring We don't want drivers using NO_IRQ, so remove its use. For now, 0 or -1 means no irq until platforms are converted to use 0. Signed-off-by: Rob Herring Cc: Grant Likely Cc: Linus Walleij --- drivers/gpio/gpio-pl061.c | 8 ++++---- include/linux/amba/pl061.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c index 0f718f9..fe19dec 100644 --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@ -53,7 +53,7 @@ struct pl061_gpio { spinlock_t irq_lock; /* IRQ registers */ void __iomem *base; - unsigned irq_base; + int irq_base; struct gpio_chip gc; }; @@ -119,7 +119,7 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset) { struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); - if (chip->irq_base == NO_IRQ) + if (chip->irq_base <= 0) return -EINVAL; return chip->irq_base + offset; @@ -250,7 +250,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) chip->irq_base = pdata->irq_base; } else if (dev->dev.of_node) { chip->gc.base = -1; - chip->irq_base = NO_IRQ; + chip->irq_base = 0; } else { ret = -ENODEV; goto free_mem; @@ -290,7 +290,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id) * irq_chip support */ - if (chip->irq_base == NO_IRQ) + if (chip->irq_base <= 0) return 0; writeb(0, chip->base + GPIOIE); /* disable irqs */ diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index 2412af9..fb83c04 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h @@ -7,7 +7,7 @@ struct pl061_platform_data { unsigned gpio_base; /* number of the first IRQ. - * If the IRQ functionality in not desired this must be set to NO_IRQ. + * If the IRQ functionality in not desired this must be set to 0. */ unsigned irq_base; -- 1.7.5.4