From patchwork Tue Mar 22 13:31:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 64175 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2066347lbc; Tue, 22 Mar 2016 06:31:22 -0700 (PDT) X-Received: by 10.98.68.91 with SMTP id r88mr54117538pfa.12.1458653482063; Tue, 22 Mar 2016 06:31:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q195si20170947pfq.247.2016.03.22.06.31.21; Tue, 22 Mar 2016 06:31:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758306AbcCVNbV (ORCPT + 4 others); Tue, 22 Mar 2016 09:31:21 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:35320 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752154AbcCVNbU (ORCPT ); Tue, 22 Mar 2016 09:31:20 -0400 Received: by mail-lb0-f174.google.com with SMTP id bc4so161889833lbc.2 for ; Tue, 22 Mar 2016 06:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+zTAmZDzvkTXcP8i8Su1BR/3kIQlI6WFxEJLf7buHX0=; b=OKRCCyyRYSXcwRBc1viekThfkx473hERSiKXhDVhzUEyFtKh89T/JPBaGiMYbhJl7U QsexKrfvWSIjZP8aJ84FD/QJ2ycAhie9DsdyovcgmmZ2TsRdq94OVetj5tcXIm/WpKG5 poY2OhLEwm4l5+r696XjcnR/vNtkFTRGxJsdk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+zTAmZDzvkTXcP8i8Su1BR/3kIQlI6WFxEJLf7buHX0=; b=Ebcg9BzA/zEoU9OriarO6iSG3QgogIx8XyQRYvEQxGAr5mLUlNWJg7Eiipo2MXIqv8 vtg4fnWYASVbaFTBUvgSRJogBjedQOTMQHzMTAxtEpeD8q9zWqCbWSiLdPzodkDoRkEE euo5WD3dlB260CqA//wch84lsBAWuWL7Rxyrw7efdcsoX4O6QIeXk8bnkkBl7HTw8ZHs MAucEw+0vUWuXAR2ycE3B5sOM7UTGAhMDM/QlDnRpGh09IORsblue8rvSLA7oalYS90x Q7D1xvdzNWVniK/X5zV+Hl7p/Up1jiSB5Kl1IGjgaE8Ky9BjfRSJMossctBM1+Grl8R7 myNg== X-Gm-Message-State: AD7BkJKMvVhG6TiN15ZTJa7r5M2tWxtgjxxAvo1xcwD6EhwOKPvgco/36KqeI314fWWqP3gU X-Received: by 10.112.125.9 with SMTP id mm9mr10599738lbb.113.1458653478849; Tue, 22 Mar 2016 06:31:18 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id pi5sm5196474lbb.41.2016.03.22.06.31.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Mar 2016 06:31:18 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij , Phil Reid Subject: [PATCH] gpio: mcp23s08: delete req/rel_resource callbacks Date: Tue, 22 Mar 2016 14:31:14 +0100 Message-Id: <1458653474-7185-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When using the GPIOLIB_IRQCHIP the gpiolib provides a straight-forward implementation of request/release resources, rely on that instead. Cc: Phil Reid Signed-off-by: Linus Walleij --- drivers/gpio/gpio-mcp23s08.c | 25 ------------------------- 1 file changed, 25 deletions(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index ae61bc2d9d25..c882c2be5a0e 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -435,29 +435,6 @@ static void mcp23s08_irq_bus_unlock(struct irq_data *data) mutex_unlock(&mcp->irq_lock); } -static int mcp23s08_irq_reqres(struct irq_data *data) -{ - struct gpio_chip *gc = irq_data_get_irq_chip_data(data); - struct mcp23s08 *mcp = gpiochip_get_data(gc); - - if (gpiochip_lock_as_irq(&mcp->chip, data->hwirq)) { - dev_err(mcp->chip.parent, - "unable to lock HW IRQ %lu for IRQ usage\n", - data->hwirq); - return -EINVAL; - } - - return 0; -} - -static void mcp23s08_irq_relres(struct irq_data *data) -{ - struct gpio_chip *gc = irq_data_get_irq_chip_data(data); - struct mcp23s08 *mcp = gpiochip_get_data(gc); - - gpiochip_unlock_as_irq(&mcp->chip, data->hwirq); -} - static struct irq_chip mcp23s08_irq_chip = { .name = "gpio-mcp23xxx", .irq_mask = mcp23s08_irq_mask, @@ -465,8 +442,6 @@ static struct irq_chip mcp23s08_irq_chip = { .irq_set_type = mcp23s08_irq_set_type, .irq_bus_lock = mcp23s08_irq_bus_lock, .irq_bus_sync_unlock = mcp23s08_irq_bus_unlock, - .irq_request_resources = mcp23s08_irq_reqres, - .irq_release_resources = mcp23s08_irq_relres, }; static int mcp23s08_irq_setup(struct mcp23s08 *mcp)