Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1758548pxj; Sun, 16 May 2021 03:20:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhyM7fSV0r/AN6QqB5Bd0QbLaZZjq3hpFeWlgB3AjhQs/VBq2yYS9kC0/9PFSRmRUo/ydo X-Received: by 2002:a17:907:20b0:: with SMTP id pw16mr8433191ejb.48.1621160416585; Sun, 16 May 2021 03:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621160416; cv=none; d=google.com; s=arc-20160816; b=BQyeYFqT8FeghZN6V6+3LovunKm+GmCN5owTnd07KmgccuXPKQzuoWOKxvCmvpoPf0 oI9Gtj0I5yG94v6bshbUGBo3ITGSu+BXGVZhEiQzb0Css08Es05+aIYM+3gThLp9RoLo ccoLJsT/CpguskJc3s7EGLLJ5HngoI4Neu7FQG84RjCGrIIQ5l0i4s5hlh5eiIV6/Kqs D51kAcrHEewcSV5gXtOYOQ0tkamJm5tN/U/XJIbT1kRlWdFnqztbZAqgG0qdfEkrGU78 ARBUZB3YmlM2Og2TPVMYGicGv5GYu6Px7CCWxpLcneWmupK/ZneGtVeJ5BRGCpCf7+lW LLtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lHvjWR+kmuxYq2yuVbEUcJld2/FdM44I/SPtdrt7wUA=; b=kWBEpkP7WP1HUiz3B82qGbSuCy1CqOyy0bjncpcklvLYBVlnuE17cSOlPSorO4M0gQ V4b/YEQDrOUDtnsS8OMFjpNdYjMeq6t/YLShLhV5q2sMtUN7jDjPzCD1XSkQDm0oxvHL hrflMlcOGDoOCrYdBM+PKf1NfL3cDs0fMJZHG1qhlKNapxJZK8Qee2h9eILFqCNS5MAL RBu8iWWNcTeSVLhWFWz1rnZ6pC8JtkvX+CRWvWs2LzNXi2xT0Vbw1sgXey4YO9WC31mc XTAqz9pGMupm0XBXN0GhNKeEBkM5RawX8zRsce8OLg5yNSKPScn0C0A1Jj0eFeuz988N ID+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deviqon.com header.s=google header.b=AKGBAzeM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deviqon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si13599511ejx.9.2021.05.16.03.19.53; Sun, 16 May 2021 03:20:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deviqon.com header.s=google header.b=AKGBAzeM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deviqon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232714AbhEPGYx (ORCPT + 99 others); Sun, 16 May 2021 02:24:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbhEPGYw (ORCPT ); Sun, 16 May 2021 02:24:52 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F19C3C061573 for ; Sat, 15 May 2021 23:23:36 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id l1so4377140ejb.6 for ; Sat, 15 May 2021 23:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lHvjWR+kmuxYq2yuVbEUcJld2/FdM44I/SPtdrt7wUA=; b=AKGBAzeMwRKHkNLlldb27cVKvfYnVwbpifQEO3EH20qUqqEF+jGSWJ+mEDClwONIwV OTZOoSS+XPybN8U3GmncC2vf9ZzXYDAXF+IjS92yVKoUSfuVfRpQ2kE1UO8O/5D1xwei J6Bu4EzCd4uQ2lFjblZrP9PObU8URJwhT9UW2DFivGJ1/v3rLURMtAsV+cPleub/i7j7 t3ZmD9X3ntwForE5PMVwX7gCKYZa00lZJEJUyDAvW6ffcelSDNE39lfn1/kmOzw6Xipx vHJ0c6773IrWZ5O0/Kqe8s4t6EYrfcLI4UD323MuaNgeU2/aYrXXUfpvP5WhrrjJp1Ze wqcA== 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=lHvjWR+kmuxYq2yuVbEUcJld2/FdM44I/SPtdrt7wUA=; b=C1/Br3ES0Hlbj4nGWJmu9tDR4GIjI1c/lqIPBi/pbZbfvpB4sD37RoKl6GBo1pmXUM 5gofF8jMx79ShJpqxLzyQ0eaK29fDk8lZN6il8QD4qEgXP1mpWVim/qQdkmdop1WDTEs 7jZBiRH/yEM+/4kWwxL19lENSXI19izclO+dE3htboBbLFnr+fKTYXfdjjUGNfBm+XxD UY8Mw0Q9u4wUKSeA9RHXlOB7SUzb5aqTN+QHJPXpAMj56IB91EipkMPFt0p72MgBdHIp PqFDDd3692oqwyoM4o48wLs9bLSVodKOOW2fpKdWeNqLTLANXnQ4B/paq62zr95F1lSz eUBQ== X-Gm-Message-State: AOAM531brjfQ8y83xoxLCiblfWR9NNM1smUmz3SKftHIjtrPEEkN4H/C rrLF9W+iOFyew6TWN1aOnFJpu+xPYjTVIDRMvu4= X-Received: by 2002:a17:906:3712:: with SMTP id d18mr21429429ejc.155.1621146214559; Sat, 15 May 2021 23:23:34 -0700 (PDT) Received: from neptune.. ([188.27.131.122]) by smtp.gmail.com with ESMTPSA id ks10sm6612921ejb.41.2021.05.15.23.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 23:23:34 -0700 (PDT) From: Alexandru Ardelean To: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com, Alexandru Ardelean Subject: [PATCH] gpio: gpio-sta2x11: remove platform_set_drvdata() + cleanup probe Date: Sun, 16 May 2021 09:23:15 +0300 Message-Id: <20210516062315.10832-1-aardelean@deviqon.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean --- drivers/gpio/gpio-sta2x11.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c index a74bb97a41e2..392fcab06ab8 100644 --- a/drivers/gpio/gpio-sta2x11.c +++ b/drivers/gpio/gpio-sta2x11.c @@ -398,15 +398,7 @@ static int gsta_probe(struct platform_device *dev) return err; } - err = devm_gpiochip_add_data(&dev->dev, &chip->gpio, chip); - if (err < 0) { - dev_err(&dev->dev, "sta2x11 gpio: Can't register (%i)\n", - -err); - return err; - } - - platform_set_drvdata(dev, chip); - return 0; + return devm_gpiochip_add_data(&dev->dev, &chip->gpio, chip); } static struct platform_driver sta2x11_gpio_platform_driver = { -- 2.31.1