From patchwork Wed May 22 19:25:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 798381 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 7348B146582; Wed, 22 May 2024 19:26:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716406003; cv=none; b=CC4vAVBqbQ0yWz9in/W4E6q92IkLNz5xvSX5cVzpQh4B4ppofodwaoaWnVULEzNh20N7kezZO6rndCm/HlCPQSejzGIlaqwaFIjr2txv/j3TdSj61k11f5CjQnR7qJtd+w6xSEEv+KojmMzwnv7riYRPW2KdXspoHjENPzoyvg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716406003; c=relaxed/simple; bh=rrshtRxJ0zBX8DKiO+PgrYPgqcxgCyYplSoLmAeycBc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=byEJ2pC87E5kWoCop02iKFziar0slpDrpMtxxZigcdJvy0WRnLnNKEz92PvGwX8cBG9SZeu+DIlS9SofprAIgkan01uf5BY6oatlms1ztnQyx4CGEEJpkxR2H6fnWACMB2DDwxAUl82OebZAISy6jOy7E0jW8MhEtbqZDbTnU9w= 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=ZjxwO0dY; arc=none smtp.client-ip=148.163.156.1 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="ZjxwO0dY" Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44MIN65V011001; Wed, 22 May 2024 19:25:37 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=qYzA3djA8qYcwsm/Lwf5UAjqaXak8juwjCb3AbTGi14=; b=ZjxwO0dYAIdmGCSATqKe2mHiAivvAUzj2yKfp7TDf51dsvPw7+pr+jsUDVBYDQlzgphd IuDPC2S9Zmq12rnr9McO8RZ0nehbYww85pW49z0efZ01rCBGPf2be5B20+zpovWi5bLB dhDyjUPlUucaLwdWsFOPNrlMVKtXxUBopby/seaQAKWxAhNV7XuxipMjR5VDiJpTXIVQ R41U46duoaoE+67KxjwiMS4Or0A60gil1vmgqk4xKijcfwvPnRowxGhE91V+tbsEz3nJ 3v7Wghh7ePNL4rtXV0bG7ssASMxBlA0YX//DKhUjBd3jknZayPMCAv2qwso339xbmtwQ tw== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y9nx0g4ys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 May 2024 19:25:36 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44MHxr03023459; Wed, 22 May 2024 19:25:35 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3y77npdqqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 May 2024 19:25:35 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44MJPWt71966720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 May 2024 19:25:34 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2EA0A58066; Wed, 22 May 2024 19:25:32 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CAEAE58063; Wed, 22 May 2024 19:25:31 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.104.209]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 May 2024 19:25:31 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: eajames@linux.ibm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ninad@linux.ibm.com, lakshmiy@us.ibm.com, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, linux-aspeed@lists.ozlabs.org, andrew@codeconstruct.com.au, joel@jms.id.au, robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, andi.shyti@kernel.org, broonie@kernel.org Subject: [PATCH v6 19/20] fsi: occ: Find next available child rather than node name match Date: Wed, 22 May 2024 14:25:23 -0500 Message-Id: <20240522192524.3286237-20-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240522192524.3286237-1-eajames@linux.ibm.com> References: <20240522192524.3286237-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: nvMLPA7-L8_M2d7QMYKFRS3j5IjPB7UC X-Proofpoint-GUID: nvMLPA7-L8_M2d7QMYKFRS3j5IjPB7UC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-22_10,2024-05-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 adultscore=0 mlxlogscore=824 impostorscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405220134 There's no reason to restrict the creation of the hwmon device to a matching child node name. Just get the first available one. There should only be one child node anyway. Signed-off-by: Eddie James --- drivers/fsi/fsi-occ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fsi/fsi-occ.c b/drivers/fsi/fsi-occ.c index 2023355b39805..9a3658d863792 100644 --- a/drivers/fsi/fsi-occ.c +++ b/drivers/fsi/fsi-occ.c @@ -669,7 +669,7 @@ static int occ_probe(struct platform_device *pdev) return rc; } - hwmon_node = of_get_child_by_name(dev->of_node, hwmon_dev_info.name); + hwmon_node = of_get_next_available_child(dev->of_node, NULL); if (hwmon_node) { snprintf(child_name, sizeof(child_name), "%s.%d", hwmon_dev_info.name, occ->idx); hwmon_dev = of_platform_device_create(hwmon_node, child_name, dev);