From patchwork Wed Jun 26 08:44:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 167780 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp659668ilk; Wed, 26 Jun 2019 01:44:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7jSTDzTXqph9jDXCjRU+G7SAky8qu67ld5H7/PjXqZpieUz/LnKux8O/JLYaRvNm/fT6a X-Received: by 2002:a63:1462:: with SMTP id 34mr1795112pgu.417.1561538656649; Wed, 26 Jun 2019 01:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561538656; cv=none; d=google.com; s=arc-20160816; b=tv7JHbHmiDjLFya9x79Qjo5zu9ThdjypSkqQASeJEjOtQhUZ6d6K1XF+Zz/BnDTGFN xlwGpCbx17cGzMEtzUDzL1zrtGFHhOIzzVDUynz6Qg6M/lMU+hDLG8YD6DrisIXr/+3L CckstA06tS1S52Yr1yHih4ERQgwpp5SA0GcaeimunqqS4+aKZUDHCGTsjCeKv59rDQJ9 y4iO1BUHkwupb3sCACKZjKcJ20vOdeiT3zptMRtQKIUfxdFTuCGVO8tsvEhukKzGqkZg Ea+arDG9YbbeiD5w4zQZShJ49Aa5GBTQ7GwhRvXTxN8Co2htsYHXhJbiU+264jQClh/n LiKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=SLIBh+4MeOX6wUrIInCjt/HbzpPX6JHV6NhcclCEZTI=; b=QunsXdXTDxRm2uM6+zSt5C6wTnpqjjjUKGJdnaSCIsbbcafsx2CeG9wWSAq2k748Ov LKoiZWDqPgxEWNyXx7q8roWqHMSiJzRcMzhwHF/fX2vLiy6qHMj6KUdlhLMUiJ3lzwKP HE3BvwdX+P9DWeWCs9jkX7BpxpwPrh6aB7NKU1LIsclbSb+3Fxu0IooG7DC/XT7U4dGq DrUNm+2wrGcdOKkQSP2As6shmOIsOP6OT9r+WFOrK5GwEBI1QMJk3WX3hgXSTF+CPm4g zlDmIOJd6wF2kuIoi1Hg9Mv6zzaCVHN6ZF+/WwQUF8qky+brir32MBKjKzWi9zBR4CeR wN1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OwsEGB0p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r9si497831pjq.53.2019.06.26.01.44.16; Wed, 26 Jun 2019 01:44:16 -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; dkim=pass header.i=@linaro.org header.s=google header.b=OwsEGB0p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726042AbfFZIoP (ORCPT + 5 others); Wed, 26 Jun 2019 04:44:15 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45120 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfFZIoP (ORCPT ); Wed, 26 Jun 2019 04:44:15 -0400 Received: by mail-lf1-f65.google.com with SMTP id u10so970983lfm.12 for ; Wed, 26 Jun 2019 01:44:14 -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:mime-version :content-transfer-encoding; bh=SLIBh+4MeOX6wUrIInCjt/HbzpPX6JHV6NhcclCEZTI=; b=OwsEGB0pjtQFE/SvBONQLCejvBkNpt4cPrYH69cH5zav0dLbnapBPv3zDqyWCj8kNw UqS7sghR5dQ/+jEx2tkbW3hQ+EjCivswmgcsX24Xbfj+yauEc5ob/O/CpthJX8vRDqwU 92HLHZhhN+G5/hPWKxzI9Qm0GaKUIyw2enCXGii2QvWS9dNF+8FZlf7w82OnKFZoU6n1 kGoRtYbu7mvD8QLC0p4NvdHiWyI82EVo2VFZCzgpvEC4H3grAES3see4nfJnBO9KsXXD z5cutm/XH6Daf7XRremxLMSiJLwJzNLl4N29VAxybSac99JLwVU1vKjujUerKeJ7M0kt 731A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SLIBh+4MeOX6wUrIInCjt/HbzpPX6JHV6NhcclCEZTI=; b=EoqwqRoiDslK0SgHMpHfoe1dpeebx0APfPraGlBmwfbqUoWMAi8wrHWHi2SRjm66TK h5CG4Ms8yAWTNXoQKcK+aLwcvbM0VzzY7vlX0Sn34ujxOkwIT1u31f7dq2RoliJCz5bj lqZ0YbBJXsg84M+Mw5rfbUjQGLRkH39OmXATpmq7rcIh9mCa+TVME/cqCPphaeDFSlHg EfGioKGE88DBK+WGC3HdiWRh5vG+W3HNanJQ/89vGy2iVkhraPgrnFtjUK3SNTt0bwoA lhBslqQeGh+82DfMAnYpj7i2FHnVRbFVp5qnVTAJqmO84LMdxGNpdwJ+YX8FQ6CLf2QT /ytA== X-Gm-Message-State: APjAAAVG7nG58vNFXqJLolPNpT6pc3Pc7Qaj6WjkeTbHTeqpt9YoVSyr Dm65YuXTM2Jj7sDJM8IyGcttX3I8nI4= X-Received: by 2002:ac2:52b7:: with SMTP id r23mr2044277lfm.120.1561538653168; Wed, 26 Jun 2019 01:44:13 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y5sm2683635ljj.5.2019.06.26.01.44.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 01:44:12 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Subject: [PATCH 1/5] gpio: siox: Do not call gpiochip_remove() on errorpath Date: Wed, 26 Jun 2019 10:44:03 +0200 Message-Id: <20190626084407.27976-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org gpiochip_remove() was called on the errorpath if gpiochip_add() failed: this is wrong, if the chip failed to add it is not there so it should not be removed. Cc: Uwe Kleine-König Signed-off-by: Linus Walleij --- drivers/gpio/gpio-siox.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.20.1 Acked-by: Uwe Kleine-König diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index fb4e318ab028..0b4450118865 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -243,17 +243,14 @@ static int gpio_siox_probe(struct siox_device *sdevice) if (ret) { dev_err(&sdevice->dev, "Failed to register gpio chip (%d)\n", ret); - goto err_gpiochip; + return ret; } ret = gpiochip_irqchip_add(&ddata->gchip, &ddata->ichip, 0, handle_level_irq, IRQ_TYPE_EDGE_RISING); - if (ret) { + if (ret) dev_err(&sdevice->dev, "Failed to register irq chip (%d)\n", ret); -err_gpiochip: - gpiochip_remove(&ddata->gchip); - } return ret; } From patchwork Wed Jun 26 08:44:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 167781 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp659703ilk; Wed, 26 Jun 2019 01:44:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqymRFrtwOCGydA6nLF4WJIhaNbPFScM31zVhYeN0aY7sSGWEk4aAyMdpjOOOMXTtN9R/fwE X-Received: by 2002:a17:902:2ec5:: with SMTP id r63mr4047943plb.21.1561538659728; Wed, 26 Jun 2019 01:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561538659; cv=none; d=google.com; s=arc-20160816; b=sDS0j0CK07h+wXwnpppcIdHYcV50yhdTRyLRAbj7JkZlXJvgS1o9OuFMV4NELRcTe8 vRfsuSsaDsk9b4m8UjO8WBq37mVCx3PBXpvDFSfRRUC0IKQIT115X4tPiL3PTq10mUjz cF8oVqdZUnzb1QBIgYQeY7aFMfd8QV/g1nRS2PtIYfbGbmVtLXi9DX2/XJdQ//LPm8hu i2QOb/9ABJ9wKeuV4+lZWbzs29aZCdbapiwlJLbuVclEDAezu4mmYdPk+3xp+xrLxuuR R17FbZ/7iLF0ojMVwxBW/ut0Ke2EF/HHlmKhLdqdTMZlLuCGpeXZtnSUNz5Z+D1hL4m5 lPlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QrsdhnFau8at9JlSXyhg1bmlEKtsXOdJ/aJxqZu1+v4=; b=dRXk6RQ/jIktPihZwZg4/LnmeWQoAXeYYO/+ZVSjEg9HtQAb8sFJ0bm+r1R5JJ7wcm 5tl+WJfr2/O7KlvUUHLLuGTL1LKSJPHYS9VhH6wGOK4BpBpn63hqEjvyjZQjrqZGP4ak uOpvCjgTPahCy1Wvra5MN7SWq/chaQeMFeiiifc6bnlK9vOShrUNlQzaNAPOaLQrF5/t fVW2+SgES8yDnpEfUm3rrVNRY+5q9ptef5MXQm6bjs71pH/lAFbFZHIfz2uuJPp7Sxdx BmL/3AAixy/PcjI5pFQ8WZilW3EFXTnpeCMKX9wDmwefYpmywwUrxAbt2uIpvUl9amcS vD5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=owCoZL5C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d30si2848660pla.419.2019.06.26.01.44.19; Wed, 26 Jun 2019 01:44:19 -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; dkim=pass header.i=@linaro.org header.s=google header.b=owCoZL5C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbfFZIoS (ORCPT + 5 others); Wed, 26 Jun 2019 04:44:18 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:36584 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726006AbfFZIoR (ORCPT ); Wed, 26 Jun 2019 04:44:17 -0400 Received: by mail-lf1-f65.google.com with SMTP id q26so1002609lfc.3 for ; Wed, 26 Jun 2019 01:44:16 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=QrsdhnFau8at9JlSXyhg1bmlEKtsXOdJ/aJxqZu1+v4=; b=owCoZL5C5zOeIJDMvu+Es2yz/dt3bZhbw0aV5tVJPdvRcW1OjLhvSnzslp22WLmySj jvZokQHYTkBiGqnuMp1XhaYQZWkF/OKXtj4cHgr8Dcy940J7yTzoyEYLfd5x6SNZ3eEE m2TUPGr0GN4n5Jn7DclDo9aGkPyer/BpBB64ifKfClkNzYYYBXQG3Uy7pPE2/TgKdxOC wPdkTeE/jt6y0n0g2bQhs2TQd3tjAALvvvlbMCPg7Tij189nyLiwhNdFEdeIuA9l6zmg Z2f7eC8hGhR+B5wn/+y/O4mV4KwSSdsZ/CMMVuSLCj7d/Po7ww1iaNUyPPigV5WwBVHm 5RDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QrsdhnFau8at9JlSXyhg1bmlEKtsXOdJ/aJxqZu1+v4=; b=BrJqq+Z6ytfdeqvDliSGK/iMYJUKPe5f/FoiSy3X3U+L/bx6XMb/liJb7RbZhDQCbZ f0kGE0lY0JjnmbBOvjPKmcX7nHoCuvBRvT4rGW5lm3jpgNNV2SkbeZ3VZbHFDpIc7LPW ClomXcSSMHjTaPO6gV1jNpfNMWGZmLDeBH1hoKBB2ehKyRNy7Qx+DgSC4OSYbVmyp8ZM JVoLM8RuPqXEzabs8LBjRgkjw8J0+MGtg54qUyd0TMTFSgjT6D0vDG/0E1Nfkq7ZQ2S3 PHEGPcuRkC+ROh4aC4y6AE1MB3SyMc7HXMH7KZERpEL5sq8gt9R4C8e2f/ZcyvjOI4gf EFlA== X-Gm-Message-State: APjAAAXYxrfMuGr2cY0V+KGlEtVzztkL/knzx/WMirzaLEVwsUKMxT9b 7iwJLy6Dc9eaHQsLtTNH4ZuHqsm8+hU= X-Received: by 2002:ac2:51ab:: with SMTP id f11mr1931189lfk.55.1561538655448; Wed, 26 Jun 2019 01:44:15 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y5sm2683635ljj.5.2019.06.26.01.44.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 01:44:14 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Subject: [PATCH 2/5] gpio: siox: Switch to IRQ_TYPE_NONE Date: Wed, 26 Jun 2019 10:44:04 +0200 Message-Id: <20190626084407.27976-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626084407.27976-1-linus.walleij@linaro.org> References: <20190626084407.27976-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The siox driver is hardcoding a default type of IRQ_TYPE_EDGE_RISING to the irq helper, but this should only be applicable to old boardfiles and odd device tree irqchips with just onecell irq (no flags). I doubt this is the case with the siox, I think all consumers specify the flags they use in the device tree. Cc: Uwe Kleine-König Signed-off-by: Linus Walleij --- drivers/gpio/gpio-siox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 Acked-by: Uwe Kleine-König diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index 0b4450118865..40067e1535d3 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -247,7 +247,7 @@ static int gpio_siox_probe(struct siox_device *sdevice) } ret = gpiochip_irqchip_add(&ddata->gchip, &ddata->ichip, - 0, handle_level_irq, IRQ_TYPE_EDGE_RISING); + 0, handle_level_irq, IRQ_TYPE_NONE); if (ret) dev_err(&sdevice->dev, "Failed to register irq chip (%d)\n", ret); From patchwork Wed Jun 26 08:44:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 167782 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp659724ilk; Wed, 26 Jun 2019 01:44:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyw91/FDZmZKZsCkvStH2BaHomO4ZwxeX2Nvsz/Cnmr2n1sEkGHRBqAdO99Y+xjFmMVXPJ9 X-Received: by 2002:a17:902:b487:: with SMTP id y7mr3961258plr.219.1561538662237; Wed, 26 Jun 2019 01:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561538662; cv=none; d=google.com; s=arc-20160816; b=hbqjgedFDxwX2uvTyxsiqWZtB2zPIa71u2W3w2cG5+PWmpVSsUubMtd4Gi+D71tuAn +pKqG+9c27qxnYTA9o2mA7Kk0reh2ukLGt1J7SMuo9wSil3m64UygRElGrRpl+vCsG2w pD3UAVPmfobc49RsUaRwew1jJhlPySjRMVxqxKh8br2gceAmhTd2IbyvTtsrOVfGK+Gx QFGZKu8PjzpvY9Kg3i3A5jcseFp6N2UmcZmLk1NqOSs1X4ii+sw7mp9HiOsyWQNHK8VO R5v+G+4Fh1D9vqRn7ioA1q2sibN9DQHrAeI3bWPqsDztXkyDvum5nlCSkbFSqSQhTZs3 jCxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cxs3BeVBcdxLHdi+Parxy8n/C7wBYADjIv/7ru8vFI0=; b=G778Bfj/N5/zAm4StY6rdr7c9CL1ER8nRjT11OZTRRNOLXidyy3zv9UYIa3/gMc1Ky F0LQrPizyb9wQWhoHohdY6hvB7SlJepRL9GEiXHfDXxDHi33ygLuXCTBZw3FEi+KEue1 ZvvkNaVuVl7vBcP/p1o6VIB6ruIL9rstV54KDqbfxBQuHIwIR0N08QFoOn5LCmNIeV+s LKBlcISrNLx+MeZbXwCiz3K2SwEDr4wRI+bRxn0RP7rgApBgyHF/F8psHE/Ql0/iYcm8 qtOW4QoKj0Vk3Q+GVYXLnRSKYgh1Kvm/gbvZv5HU01bkY+B6wcCHQkLMxaWzv8K8YHlK LYaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tNxzX1jV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28si16172846pgy.252.2019.06.26.01.44.22; Wed, 26 Jun 2019 01:44: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; dkim=pass header.i=@linaro.org header.s=google header.b=tNxzX1jV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726833AbfFZIoV (ORCPT + 5 others); Wed, 26 Jun 2019 04:44:21 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44487 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726006AbfFZIoU (ORCPT ); Wed, 26 Jun 2019 04:44:20 -0400 Received: by mail-lf1-f67.google.com with SMTP id r15so977925lfm.11 for ; Wed, 26 Jun 2019 01:44: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=cxs3BeVBcdxLHdi+Parxy8n/C7wBYADjIv/7ru8vFI0=; b=tNxzX1jVP2M+/XVPMUBjJztx2fa2/ochZbHKKIzoBXFrXAf9uEyUFTFO29kO+f/3+b T8fDtmEN6odb6aTzFBbR3ftb6qCRkztbJ1fVCmnFz2flgNVexsOUUPSrlx7G4AIGTkth YMffkyQmNfQYbNXuP5pX9R/SxgfT2WJnILq3aQd8Wl2S+yAmvBI9aeYm4gkmyEzGMuSb 3ZiBPvx/nXuNlvCXM8FaS/YqzZ65xw9gtDHJXLedu6f3jFlcT0OV0uZfhUbAYDUusolF jBkePQQH9iGQHEM522AD41NNF3j22e8YZOeC0PoC7Rz6esuozF3F28jiW4B/L0Qv1SWu /FpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cxs3BeVBcdxLHdi+Parxy8n/C7wBYADjIv/7ru8vFI0=; b=RLb1nPHYgXK1AYGqXEFdvmsSv7gOu60AUK/6nRGkof73TZO0CBi3VieSpS9qd36sWF FfEWW5jtOXe8iH1BZ/j6qQMY/EFDx1xB7H3mOjzu2aQ1p8chP2dKvxHLEhx1G+9q5Wjt WnEb8dgnCEVWcGdlSJPFGgRx8dvBRW2FRnhzjaJHdI3KhEs2XeZUpQgZ3Mtwnnkz28sE F3kQMO0wLZ970EWDgwvY26ZdPUhyWmqjGZ6GBUMoMwWJuLItrmBy5eCPJU8m4lh6ojWA wPEeiMvvgM2cp85cFD80KQDCf6nT9n3PtZ95rVQiKPpwOtQf19pZxSn+dtV7A7KP6W8u AzBg== X-Gm-Message-State: APjAAAVsXBh/FUDZHEZWjHBb8FOfWjIuUvmkM2ASBUb+Fqe8/GuuuK2A lwxOYWPWwGArCwRPg9wb/8qhhvABrg0= X-Received: by 2002:ac2:499b:: with SMTP id f27mr2002246lfl.88.1561538658376; Wed, 26 Jun 2019 01:44:18 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y5sm2683635ljj.5.2019.06.26.01.44.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 01:44:17 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Thierry Reding Subject: [PATCH 3/5] gpio: siox: Pass irqchip when adding gpiochip Date: Wed, 26 Jun 2019 10:44:05 +0200 Message-Id: <20190626084407.27976-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626084407.27976-1-linus.walleij@linaro.org> References: <20190626084407.27976-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Uwe Kleine-König Cc: Thierry Reding Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Split out bugfixes to separate patches. --- drivers/gpio/gpio-siox.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.20.1 diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index 40067e1535d3..31749c058e33 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -211,6 +211,7 @@ static int gpio_siox_get_direction(struct gpio_chip *chip, unsigned int offset) static int gpio_siox_probe(struct siox_device *sdevice) { struct gpio_siox_ddata *ddata; + struct gpio_irq_chip *girq; int ret; ddata = devm_kzalloc(&sdevice->dev, sizeof(*ddata), GFP_KERNEL); @@ -239,6 +240,11 @@ static int gpio_siox_probe(struct siox_device *sdevice) ddata->ichip.irq_unmask = gpio_siox_irq_unmask; ddata->ichip.irq_set_type = gpio_siox_irq_set_type; + girq = &ddata->gchip.irq; + girq->chip = &ddata->ichip; + girq->default_type = IRQ_TYPE_NONE; + girq->handler = handle_level_irq; + ret = gpiochip_add(&ddata->gchip); if (ret) { dev_err(&sdevice->dev, @@ -246,13 +252,7 @@ static int gpio_siox_probe(struct siox_device *sdevice) return ret; } - ret = gpiochip_irqchip_add(&ddata->gchip, &ddata->ichip, - 0, handle_level_irq, IRQ_TYPE_NONE); - if (ret) - dev_err(&sdevice->dev, - "Failed to register irq chip (%d)\n", ret); - - return ret; + return 0; } static int gpio_siox_remove(struct siox_device *sdevice) From patchwork Wed Jun 26 08:44:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 167783 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp659737ilk; Wed, 26 Jun 2019 01:44:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5I6Z1zQYd0N+6QozPOk1pRN4R+HwD9F27RdicGAyeZZe/gjCtBRqH5RGXwFrtzCdN8TOd X-Received: by 2002:a17:902:2aab:: with SMTP id j40mr3961918plb.76.1561538663813; Wed, 26 Jun 2019 01:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561538663; cv=none; d=google.com; s=arc-20160816; b=caRm+3KlL+ggy/CyqkLlvaVP7r//ak13mI2ppXoaJDWIvRnUhKybukhGPWxEChI/Bo CLMLHIrq08k5XCB8wJ+/9UEGQogz0eGXqlMxreoYF7TYI101F+LAQINb7CAJ8LhU1S0o 2StWthS4+dhw3ZJU/CJcw30SOPonctvo1lhtgGkwb/9RhkEWu0I96+4ep0Nl2ch/j1Xl kfEhENm+ziOqhQNnPKoVO6PT5QObWz6sV0kI+4Fnba4ePjuwaOCHML1DSVphvNV/ToMH QmGnbJnwzMrXsJnPll66bjs6/DeM7rXn8uyJxUatsRFgMsOmPzTem7o/inHe6SwELwsD +LOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x1lkaTi63iwBz94zE2XHXLCsstz8matol9Cqw1XSNic=; b=I/vo4yWIkGGFHt3ZjlCh1DWCGVabO7ZSqudqXBRUd+azsxeF9Y0PqrYBL54Rv9UpDG xUc7Ovdmyk1tB1xmLwa9O9o7mcs7KiZXLwn64EJVVZkY5Uk+cPf0SSJIxSHs2ZjvaX4J p51zL25KlGCTzJtxDrWAb7MiAYzxe8baKfJeHo8T1bkvKL9elctmomUkL5AWtlu063NS opeHs3/CZGN5HpnRxWXiz3zZ0qizlKwdXylWZzZwGlPCE/PIhxRnviJHqgfp4wq0Jq7v f8EdpOIsf4RwSNoM0ueDhefdVBelnTqgzITAJfCip8DB0P8ZpANqiLi8aQ83Sg71RlwW kSzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IG01X172; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28si16172846pgy.252.2019.06.26.01.44.23; Wed, 26 Jun 2019 01:44:23 -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; dkim=pass header.i=@linaro.org header.s=google header.b=IG01X172; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726849AbfFZIoX (ORCPT + 5 others); Wed, 26 Jun 2019 04:44:23 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:46260 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726006AbfFZIoX (ORCPT ); Wed, 26 Jun 2019 04:44:23 -0400 Received: by mail-lf1-f66.google.com with SMTP id z15so966347lfh.13 for ; Wed, 26 Jun 2019 01:44:21 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=x1lkaTi63iwBz94zE2XHXLCsstz8matol9Cqw1XSNic=; b=IG01X172XqUJSWpN18yLVha5rtcaFaYrErxmjpwJurGZk+DldemW0D9+a7vQcZ5yeK PCmCZK/g0+MYjhjePr0sixoLG/H1QVTyDyW7kOIzXm/9/dqZne/dGgOCFolcGJ5Uzg1n P1ANBDbkET18C2d1uHt5F7+KgEI61WGGTnaYPAEucUpwKZPw/0ADu+0eINDjG9/B1rZd kuKjytabiIRVOGSpmSbhmE+fpRLYGrd1eyrpRmvn0dev2kdjVBmLl+JNQMdt45v3Jrlu thueaJoEResYpGiFWlxg75sbi5uWjNopQOI9R3rfvAl2o/OvqN83CurzecmBi4KCPTrb csWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x1lkaTi63iwBz94zE2XHXLCsstz8matol9Cqw1XSNic=; b=mHcah+efTk1jEZBWH4eTzF614MlU+QKgSJ66WFtmQxgn19Aw8rGV/ISdSLH+VhpL/f pliZx/zPJv9CMl2MB4iG7f4iQ/xpDFUlYp+QtN75ym8nGr24AH7neAXbdSf09yKErFcW DQ3LLZNWiiYgGSMsZ3aN2l+y+FgFdoDm3cpRiKGDe3/gchfuln91KyanFueSKKig6AMb w2tkhO0imJrteeJ7v+gzxio590d/Z+AXtx3XAEG74FUSp4dN+hFbhPJSBJg5x/3wNeHR rCrua2qqiDR6cxgSYNtXf9LaFYDv34W+L9zbwpXHRYyt/85PrmJI9MC9I0FqoGWUqe2A GgqQ== X-Gm-Message-State: APjAAAWzTMJzB5L0L5VUGGErM13WIO8o5KK4976F2Lh1ctfTseb3XSuw MF3K/yF4mK3iejBv+716RaJDLqQG1jw= X-Received: by 2002:ac2:4904:: with SMTP id n4mr1920945lfi.53.1561538660465; Wed, 26 Jun 2019 01:44:20 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y5sm2683635ljj.5.2019.06.26.01.44.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 01:44:19 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Subject: [PATCH 4/5] gpio: siox: Add struct device *dev helper variable Date: Wed, 26 Jun 2019 10:44:06 +0200 Message-Id: <20190626084407.27976-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626084407.27976-1-linus.walleij@linaro.org> References: <20190626084407.27976-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This makes the code easier to read. Cc: Uwe Kleine-König Signed-off-by: Linus Walleij --- drivers/gpio/gpio-siox.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 Acked-by: Uwe Kleine-König diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index 31749c058e33..f85f1fab781f 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -212,20 +212,21 @@ static int gpio_siox_probe(struct siox_device *sdevice) { struct gpio_siox_ddata *ddata; struct gpio_irq_chip *girq; + struct device *dev = &sdevice->dev; int ret; - ddata = devm_kzalloc(&sdevice->dev, sizeof(*ddata), GFP_KERNEL); + ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL); if (!ddata) return -ENOMEM; - dev_set_drvdata(&sdevice->dev, ddata); + dev_set_drvdata(dev, ddata); mutex_init(&ddata->lock); spin_lock_init(&ddata->irqlock); ddata->gchip.base = -1; ddata->gchip.can_sleep = 1; - ddata->gchip.parent = &sdevice->dev; + ddata->gchip.parent = dev; ddata->gchip.owner = THIS_MODULE; ddata->gchip.get = gpio_siox_get; ddata->gchip.set = gpio_siox_set; @@ -247,8 +248,7 @@ static int gpio_siox_probe(struct siox_device *sdevice) ret = gpiochip_add(&ddata->gchip); if (ret) { - dev_err(&sdevice->dev, - "Failed to register gpio chip (%d)\n", ret); + dev_err(dev, "Failed to register gpio chip (%d)\n", ret); return ret; } From patchwork Wed Jun 26 08:44:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 167784 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp659769ilk; Wed, 26 Jun 2019 01:44:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLjqQ5h/QD1z4lIpm4Zq7Wz+VD9HpkOnQASrlaQZKettnTSl85YRwb4ZPZqypKLuI5AK2S X-Received: by 2002:a17:90a:33c4:: with SMTP id n62mr3449836pjb.28.1561538666383; Wed, 26 Jun 2019 01:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561538666; cv=none; d=google.com; s=arc-20160816; b=dlJc1C8oYauSM2Tn+1b10LPqXL0NbXJyQQv4L1kD1VS4rgpfB+hfUfRpLUcSpZgMz9 O2F74D16vNMslhxrsRa/BGJPBp6T5uwN1rDNT8DIcU6l4JfdHvg3JAXkLjyEZxDnxauj NfPXqGvjk9eBLieL8FWqAXvacnx1ruKe//IlDelsUucvueX2PfJCZEy/DDWtfQfSjQBB nN0PgrmUzPQKSbba7tGCMXlVIPB9IK+NF/137gFopU3gPrLB08F537mIUBdi4xNS7+n3 opjkoF6YqmMYzJQzVBGomjWYelbpeThaur/GosxIWBHuBZGjWZcmxPZvXNXHQlIldRhm DLjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/Thv0yruwmmup3gZPVBMby8+N9UFFpu3/fAgwAoU8xE=; b=Vi2OmFIX4daHuu80yKUoHWR8FEkUCC+83pPrOE+qEtkdRAWUB+n+51UgXoSVnXgHeH i+9N1s/U1utwEBpinoaeoTxc1FjejOQC/kMxUyAjOUNFscoLGSFqo5JTvhMrVJi7NctR gM/yLCCbx7QNV9Yvi0n+9eK1uPPQzicQiUBqTLRYjwJz9SigLW3WBU3RbLe1kYApjN2f 2tIVwY/iqgz78Zs4Q7eyZlXSZictENqv9sEqOAF9W86SfbHjm/hv0G4nZxk/tl5VeIT7 5opGVNPAlLp9n2c0D4sm4xGpF7puopHPaWSF8KXNKfumQhiQ+MJwI3jEJMmFnwbzXW/b 0YKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=knnu9IX3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28si16172846pgy.252.2019.06.26.01.44.26; Wed, 26 Jun 2019 01:44:26 -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; dkim=pass header.i=@linaro.org header.s=google header.b=knnu9IX3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbfFZIoZ (ORCPT + 5 others); Wed, 26 Jun 2019 04:44:25 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:41522 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726006AbfFZIoZ (ORCPT ); Wed, 26 Jun 2019 04:44:25 -0400 Received: by mail-lf1-f67.google.com with SMTP id 136so984652lfa.8 for ; Wed, 26 Jun 2019 01:44:24 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=/Thv0yruwmmup3gZPVBMby8+N9UFFpu3/fAgwAoU8xE=; b=knnu9IX3AnghdmjiUVHJy9jxcgNpjMBB66zzyDAghznBI8N7ROY8lSn4mf2RTQexKt 7vETLu1V5IfVMrlInrD/CUsAgxv0diehd/u7LJTVq25G1VE5Aw8msLh8zeNaNdxK2ZG8 7MmH3QNXZ+t0ntocSvlPczy7FtqUvv0PIeNz/+6O/5AAwwb3W+RjTdA6IvFpAZd9KxVn hnamNT9zrlqgpnOCgYHJHMaex6nGCS/9OpZi4JOD4uEMj8t8YphkegkEpNDbOUJSWie3 pd6nXFcqsX+4Z6pY9YSzrrfkNdGjTmjWy9n3jDlohh9S4Sqis98yLW4O97r5LCYyK8TW H4+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/Thv0yruwmmup3gZPVBMby8+N9UFFpu3/fAgwAoU8xE=; b=HkyzON4jy5spYid7Xoif7exnicY3k8vaW0FkJwVQwAY08AF9T00SJp649TsCT08Jdv 3TO8BGnTLpda04DavkGA/MRDrPKHOqWx64h1gZBiETVOLw238cZwgC3hV1khsRBZHdJp OPGAvxFgq4k0EfPLTln0LqJuyIyTOZq2GUGmT8PToqWBvxjJXs5K9X7x56V2skbN5h/D W5AHg2aAbfo9TqN08RTIsIylbZuTcpf2h0dMWZYrXk3NrFw4nTlY7InjuTL/H+3sP4vT 1PS1huSvdEQMKyQT/yJxs/88QtWqd1wycvNgrANXXN4RXwBp6AiEBSjGw90Y0BJZqW6D 3mog== X-Gm-Message-State: APjAAAXNS0E7uDxcA/9daJ41H6vaz6Q5hMdLmc0dqFtCGV6oLIHnTpgd keaW/vygUR1rG7aLpuGgjTYJJMZnZyU= X-Received: by 2002:a19:7607:: with SMTP id c7mr2108961lff.28.1561538663409; Wed, 26 Jun 2019 01:44:23 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y5sm2683635ljj.5.2019.06.26.01.44.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 01:44:22 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Subject: [PATCH 5/5] gpio: siox: Use devm_ managed gpiochip Date: Wed, 26 Jun 2019 10:44:07 +0200 Message-Id: <20190626084407.27976-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626084407.27976-1-linus.walleij@linaro.org> References: <20190626084407.27976-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org By using devm_gpiochip_add_data() we can get rid of the remove() callback. As this driver doesn't use the gpiochip data pointer we simply pass in NULL. Cc: Uwe Kleine-König Signed-off-by: Linus Walleij --- drivers/gpio/gpio-siox.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.20.1 Acked-by: Uwe Kleine-König diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index f85f1fab781f..5e3861c1ad99 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -246,7 +246,7 @@ static int gpio_siox_probe(struct siox_device *sdevice) girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_level_irq; - ret = gpiochip_add(&ddata->gchip); + ret = devm_gpiochip_add_data(dev, &ddata->gchip, NULL); if (ret) { dev_err(dev, "Failed to register gpio chip (%d)\n", ret); return ret; @@ -255,17 +255,8 @@ static int gpio_siox_probe(struct siox_device *sdevice) return 0; } -static int gpio_siox_remove(struct siox_device *sdevice) -{ - struct gpio_siox_ddata *ddata = dev_get_drvdata(&sdevice->dev); - - gpiochip_remove(&ddata->gchip); - return 0; -} - static struct siox_driver gpio_siox_driver = { .probe = gpio_siox_probe, - .remove = gpio_siox_remove, .set_data = gpio_siox_set_data, .get_data = gpio_siox_get_data, .driver = {