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; }