Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp481742pxb; Thu, 19 Nov 2020 06:20:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLRL6zyEDDH6rlRa5qtp+fS9+2VeolQXXKVWr53fkOQnKLL36w4c3ej/hMn8AAo3tgP+Ww X-Received: by 2002:a17:906:a444:: with SMTP id cb4mr29909883ejb.416.1605795604238; Thu, 19 Nov 2020 06:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605795604; cv=none; d=google.com; s=arc-20160816; b=ekb72un+1NJ5HWSu77+WJdnjXoBAR+lk/y8DYnztuU5LhZ0sWOZ8Z8jh7o4yqTZxxj HcXaAmr0i3WM4JjHJ3M2wpWTAAHlzqJ/r87wrezBFd+WOEkWWFyKQ2r9raCMyQtabLBK qPuvCXSXRCuAdw/I0bQyXdDAx6Ihwbq3tQnHiJeDUBGSWLWFrLSwzY63C+4AQMWt37jU yGEEGfiZE7yVWfayPG2fauU5hi5EhbhJshBuOyWDUX7e3tiqOlGir+EgYytxDq7EziM7 UjXFqHLnqPH2WfuUkrxfgwD8+Ka+rqr4R8TcADRyy65PA5LqtIXQxTsMBr8gFYHXz8Pf 2OkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=ngyKqeVhj6yIWBSgKbZUX2Uti1XFetqpsQmXixjqp0A=; b=i9gioUOxq36XzjLwSzDze3IGKNL0Y8NMvRSa/v8fBawIzXBEwjMJnzS1usMWCp1IFD TSccP2Jng1F+3tKtw1DoqK6veVrRtaTXI1AcrhcaWxr0XuUUqnlYM9ZX6eUX0Qavpi0I UolRSeJ2Hnexcs+JQvdNyh0wo+YNCFC6EDjINo7b3tVR8Ylil/5krNtKBnlfZUAOHb+Y +7Kmcqpeo6s9mH3uUnESNCRNZqM1Nyzeu9Yrg7cuXW6ml7jCeiLXzcSPyfXz//XoT0fS jjNyrtxPHsybNF4hO9o9n0TGmLki+HVuB1KAGRK0EOeW78EQ6VpLx5vxGJnb1GLpU61Q a7uQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si7229915ejs.429.2020.11.19.06.19.41; Thu, 19 Nov 2020 06:20:04 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727955AbgKSOPy (ORCPT + 99 others); Thu, 19 Nov 2020 09:15:54 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:50244 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbgKSOPx (ORCPT ); Thu, 19 Nov 2020 09:15:53 -0500 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AJEEYlK029032; Thu, 19 Nov 2020 09:15:50 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 34t9ybt85d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Nov 2020 09:15:50 -0500 Received: from SCSQMBX10.ad.analog.com (SCSQMBX10.ad.analog.com [10.77.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 0AJEFm9N029123 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 19 Nov 2020 09:15:49 -0500 Received: from SCSQCASHYB6.ad.analog.com (10.77.17.132) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 19 Nov 2020 06:15:47 -0800 Received: from SCSQMBX10.ad.analog.com (10.77.17.5) by SCSQCASHYB6.ad.analog.com (10.77.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 19 Nov 2020 06:14:37 -0800 Received: from zeus.spd.analog.com (10.66.68.11) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Thu, 19 Nov 2020 06:15:47 -0800 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 0AJEFidk028071; Thu, 19 Nov 2020 09:15:44 -0500 From: Alexandru Ardelean To: , CC: , , , , Alexandru Ardelean Subject: [PATCH] gpio: xra1403: remove unneeded spi_set_drvdata() Date: Thu, 19 Nov 2020 16:21:04 +0200 Message-ID: <20201119142104.85566-1-alexandru.ardelean@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-19_09:2020-11-19,2020-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1011 spamscore=0 adultscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011190107 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no matching spi_get_drvdata() call in the driver, so there is no need to do spi_set_drvdata(). This looks like it probably was copied from a driver that used both spi_set_drvdata() & spi_get_drvdata(). Signed-off-by: Alexandru Ardelean --- drivers/gpio/gpio-xra1403.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-xra1403.c b/drivers/gpio/gpio-xra1403.c index e2cac12092af..49c878cfd5c6 100644 --- a/drivers/gpio/gpio-xra1403.c +++ b/drivers/gpio/gpio-xra1403.c @@ -186,15 +186,7 @@ static int xra1403_probe(struct spi_device *spi) return ret; } - ret = devm_gpiochip_add_data(&spi->dev, &xra->chip, xra); - if (ret < 0) { - dev_err(&spi->dev, "Unable to register gpiochip\n"); - return ret; - } - - spi_set_drvdata(spi, xra); - - return 0; + return devm_gpiochip_add_data(&spi->dev, &xra->chip, xra); } static const struct spi_device_id xra1403_ids[] = { -- 2.17.1