From patchwork Thu Feb 15 22:07:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 201786 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp152770dyb; Thu, 15 Feb 2024 14:13:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWYjNbJKeRw4PiVrgHuvW9PQVqpeccS5QyDm0kb2nkitSJjFsiEHoj1uQPRRuV4EP0Gy2jurYei6kz1LaeXeab5U8EfxA== X-Google-Smtp-Source: AGHT+IEAGAgEVGQvwwzhxDD2f71Z7Q30JnHImQjUImaE/H/Ym2g1DY5gsuI9qSXXD9QfJf8n/N3T X-Received: by 2002:a05:620a:2158:b0:787:197a:981a with SMTP id m24-20020a05620a215800b00787197a981amr3040752qkm.46.1708035234368; Thu, 15 Feb 2024 14:13:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708035234; cv=pass; d=google.com; s=arc-20160816; b=NmEHgxMzUP/HQhNnTzh4aaU4t+ytpUbTWWHgNuWIHWQNWPcXLVVLhOFsU/CRS2Hz6E nYkGj4EvzgkKK6lkZctj2WhWaokVdOjQpS0XZEPhQ79g6EMBzvdwZtWwGqXx+eM9c9Vx H2EJfR2iMt0iYSoCPtAXXXlWhgVsolgwIMTZko3ouuM+ktWg1/EAPrNx2CB1cT57SGEW PMSa7zBGkMkBqar9WN2m0LYCeU6RDzU0L+irhhpqSwSpJTQVapUnYzFc5x2AjWHq4lwf /vcCmcyx4V5n0K+z5qaF+HFG2VchJa7/MTD2GwC4c+o02DUWVtuo1yRKzdRKk25zjxkW gPAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=BoYmg2I4Q0k+a3TaU4ABCYR9yHgcAHY+742VsQ7xQZc=; fh=Usz7XAB1EI7Q/DdLEXd449E1MLGpSzqdCCNe5XKh9R0=; b=PgiNRlBYepgNlST0OyyzJHX4D9vvrqueZ6vicG5b4JKgrbZ4zz+59UbhPvb7X+4rxA nGXpBP3b5bKBPnxoBWPOWYiz1Ok5LWU/rqkaHL2uad02SWCnfKxIb5AYHrrOv/qIzP+U PiW0o+V4oOa8X7+MRjqzjwNL2XlJYAJYCkQrFcmNaGpIUvmPrwPs4dLaY1ldfRRru8tG bhDkWcDknjmKCL3LVHbH1Cx/LBH1UbZa//5hIo0DBNZ2ToyyLw2egg9yUNgn5Qv2SuF0 r37tNOoaODO4L/PZ0cZE3vflojmeWyM+Q6MxKyR7Vs6XRnZ02MyK7cy53RtHo1GPmjwc 8o5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nPxhchfI; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-67750-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67750-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j25-20020a05620a001900b007869b745e1esi2539863qki.696.2024.02.15.14.13.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:13:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67750-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nPxhchfI; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-67750-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67750-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 14B241C21C26 for ; Thu, 15 Feb 2024 22:13:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD76414E2FD; Thu, 15 Feb 2024 22:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="nPxhchfI" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A32D146916; Thu, 15 Feb 2024 22:08:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034909; cv=none; b=JNK9L7nzEw6XLpDPXAZezhyHhU3+b9aL86vV8zr+xjBUNxP8gQL6onWPel1od3UFz5Bl/egAAyx+3CEqlyiX8a1X2yN4y5/hhbINY8HCT9pwxRmDxaj0VKfZCwC2nRbDnM179wM9GZ2aLE7mabGa6qMsT1plLAmYxz0K8NQTFY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034909; c=relaxed/simple; bh=8Ct3J2NJkURDInEhDXz003U01AuCHf4/0dNy3zQDeEk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZTG8Qdics8WvlvDRSIdzMtTgtEXj+Jz3kgGZ31uo3jfLnd5ri6nagIyud63j7Q2FAmMEADt76T7L8sA0ebiXjimSwosIizt7AYdymphyP27EfP3H4QESsQx4rgwQ92wt1KL0nMZfDFWOSSTSzyFU1m0QsM4SO/3l8Pvu1sXcWpE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=nPxhchfI; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FM0XVx017942; Thu, 15 Feb 2024 22:08:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=BoYmg2I4Q0k+a3TaU4ABCYR9yHgcAHY+742VsQ7xQZc=; b=nPxhchfIkH2wViv3C6u2zH7XROEw2xoNVuvA1hfEIUgA6YNhtxmyn2aPdaWwz0y/p+6/ exuQw+XJIfY5FTTsqclVIPSsqc2LlcV83hijqHh0OWcf0OY2SQem6X3vOM0eVA4JQb6E UtFU5860C3jCIHl9MquvZcAzOj5T+Q99m69mKygTDdl74XoScKjKsJ835LBR9WJsq59U rHr9qyq54eAnQVkIlK2XTzzq0aG4uv+zaae1dn3JK8zxlQZ6N6nfZZl9l8TSSS+V8PpC g3IumJvERLjqTyWbY2OUzWUD0TbVhqjySimU1mV4V7YmOGlv9B8NS3MI27kAyn9XfN9T 5Q== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w9u1bg6ak-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:12 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41FJfrBX016479; Thu, 15 Feb 2024 22:08:12 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([172.16.1.8]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3w6mymyhcn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:11 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41FM89ED64815402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 22:08:11 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AD99F58073; Thu, 15 Feb 2024 22:08:07 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5941C58078; Thu, 15 Feb 2024 22:08:07 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.14.18]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 15 Feb 2024 22:08:07 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, andi.shyti@kernel.org, eajames@linux.ibm.com, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, sboyd@kernel.org, mturquette@baylibre.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Subject: [PATCH 16/33] fsi: aspeed: Remove cfam reset sysfs file in error path and remove Date: Thu, 15 Feb 2024 16:07:42 -0600 Message-Id: <20240215220759.976998-17-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215220759.976998-1-eajames@linux.ibm.com> References: <20240215220759.976998-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: lWmY2azHfseoGHZSM51FysPjP0lIPbJt X-Proofpoint-ORIG-GUID: lWmY2azHfseoGHZSM51FysPjP0lIPbJt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_20,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=931 bulkscore=0 phishscore=0 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150171 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791004754352437339 X-GMAIL-MSGID: 1791004754352437339 This fixes a duplicate sysfs warning on device re-probe. Signed-off-by: Eddie James --- drivers/fsi/fsi-master-aspeed.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c index 2258980e4c47..c36e7e49e965 100644 --- a/drivers/fsi/fsi-master-aspeed.c +++ b/drivers/fsi/fsi-master-aspeed.c @@ -410,6 +410,7 @@ static int setup_cfam_reset(struct fsi_master_aspeed *aspeed) rc = device_create_file(dev, &dev_attr_cfam_reset); if (rc) { + aspeed->cfam_reset_gpio = NULL; devm_gpiod_put(dev, gpio); return rc; } @@ -575,6 +576,9 @@ static int fsi_master_aspeed_probe(struct platform_device *pdev) err_regmap: regmap_exit(aspeed->master.map); err_release: + if (aspeed->cfam_reset_gpio) + device_remove_file(aspeed->dev, &dev_attr_cfam_reset); + clk_disable_unprepare(aspeed->clk); err_free_aspeed: kfree(aspeed); @@ -585,6 +589,9 @@ static int fsi_master_aspeed_remove(struct platform_device *pdev) { struct fsi_master_aspeed *aspeed = platform_get_drvdata(pdev); + if (aspeed->cfam_reset_gpio) + device_remove_file(aspeed->dev, &dev_attr_cfam_reset); + fsi_master_unregister(&aspeed->master); clk_disable_unprepare(aspeed->clk);