Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp565506lqp; Wed, 22 May 2024 12:27:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlXmp7l6rAxWNU3t+rldAyTIsZ3BA7QVUeWiMxlXtoqlxmyydQkLqWUpuC6EaZGHaLqCzZ4+fXKQnrmSLSuB3kI+wuC8RXzPnGzixKfw== X-Google-Smtp-Source: AGHT+IGK/ayxLaTFuvZfC8RMZiW4HPSAlkbI8/+dEGINGgAiAr58n6hnaxKS7CktdNoamnpHIsud X-Received: by 2002:a05:6a20:564b:b0:1b0:3190:96de with SMTP id adf61e73a8af0-1b1f87ebe7amr2656191637.34.1716406046668; Wed, 22 May 2024 12:27:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716406046; cv=pass; d=google.com; s=arc-20160816; b=pmkjD0d3ltAVHYtA6YeaB1miH6osFfQFci/hVbN1X3nFTSzr8iMOIdm5HuDZO3sdQ5 zzKH4HZ/DMw9g5R9xwgh4ZXNZhLDFnYgfWoi86ascIdecmU8orJGp49GWS6rA/mN1WSc kyp+H5TYpB54JFc4IYTSYPTj2ozn0AejW682q5QZyln1bjHiq3jUDq+jZXxJbpsJtO5R J6O4R8U1dLGcFSvBZ0rQk7V/eHgCty+JLeC8mjp3jUz4WrIDp561pYJvUEDZJIjq4xhG Z8fQCnVDxF4/lSQBrnrijLzFrBZKgU7VI1mi2U4uYpe6lOTE6e8Q/X86YHIvVH/TXNdP xDaw== 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=qYzA3djA8qYcwsm/Lwf5UAjqaXak8juwjCb3AbTGi14=; fh=fuUsOn8sqioWxqQMjS/Yz49SJoUsXedCpn3NrOQmAmg=; b=IZSZtAytEHfN0bBLi3qAWWkGbpumpgk1sAUzWv/7SAwLDBMDqmv09bI6OAWuX3N1bL CBe0efgDWdyi6rC+sc3XOFbs5eKRwDzShtCa36NZszG9Vt0nAn7CQR7MwhH4eTWiAD9m fAP9BKmHKi9bx+HK5X/Mco4I1CTyydhL+fMoo1vYL8sZqQlkI5BfBP911+9r8LAkRRcg vHSId+bd7iLwWx+jTH23qB21hAosg+0FJEjQ1SHo30swx9BGBjKX+6YvE1JNcqWk/srN ZidMM6EMTjORKMs/kSmkY4v/Oq8aEshZvh5iklJiUAqY6WZZh3MlfRhahGhio+63LsL3 YeSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZjxwO0dY; 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-186651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186651-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-64de70c5832si4750590a12.573.2024.05.22.12.27.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 12:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZjxwO0dY; 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-186651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186651-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1607E2829B3 for ; Wed, 22 May 2024 19:27:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B26D31474CF; Wed, 22 May 2024 19:26:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="ZjxwO0dY" 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 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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); -- 2.39.3