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 = {