Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp501268lqh; Fri, 31 May 2024 07:52:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDDcbqCRM4Klw1ZMpw45HeMcpyZIeB33To/GeyRk/oz8gcdi5ABvY5eazZbC/UaretU8dODShaIMVtMOvCXnHQj2IbHDTzEfFjIdnH3w== X-Google-Smtp-Source: AGHT+IGz/oJZmSp7u7h2Cc08cdeBqm7pGG+zRefEsW8j4pgQzXBD6yri0/Kc+HRewijBqeer1YzM X-Received: by 2002:a17:906:414d:b0:a59:c807:72d3 with SMTP id a640c23a62f3a-a681933565fmr203099666b.17.1717167138178; Fri, 31 May 2024 07:52:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717167138; cv=pass; d=google.com; s=arc-20160816; b=j+dfScS/dsfmkKfhahhWWaUADcYYFoQJQhc3uR09tZqnEONnXM95qWd6u6v3+CBnbe l2SzCjLoU9O8bnV00XUaRWf8Qwq8CAbPbjpbUtYcxFN3j2qT0qZ36CFwhRiTXpEMhD/v d6T/0L7b2zU40qnQsKCqd6gMHp8I2FKIDQkPsa+i0X8D4A5dL8kNuvk5Th/co/qq9NXQ QxoWRCfEeJNqyzIm0peYNnKCgb/+hG89xdmPchOB8aEjpk9aVkf3+yPtGrKwBKlT2YML LgJgjJ3bc2seC2/AhoAZwTu+kdu/jpNoYuwTH45tHP29T6TinroRERhiT5FCl/ey45KD UhyQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=wo6arRtXmvmhR41vKxhyXtAU9s+ZWQ0uhqh+mvzmmoY=; fh=gOLlWcF+u4qtL0nS5u2VXLzPdRnD9UMAFke6d7h+ZvQ=; b=PjB7x4L1rIKS8HAYOKnaFRjF7DTVfiI8t/H31yqLHBdny1UyA08P0TdO1VVs+RM1Bt bcANVE8S3B3wdkL25lqH2leEFZaXEtHGLYHO19Zgy4okfCdWejIgu3aphIICI5qSXrrP 0vRxpKSRZqLORbf2Qzpyv7jzXkPq1H/qpKAi5d2wt8GtZKGk8oQCR3BQQ+mpHhaAt9+9 8wbsjsDZ28U9UMiBBbqpTASsZmwxjIGDOzh8hA9ol0xgIy9rkiUvqhLChiZtc7KDrRrs Vqn32lFgit1WguiDu02XspZ3II5YEyx4wI8CfYq3JBMVBGR/3rzrF6288+TOOGoMKZq6 08fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SpihBMpm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67e6f02cfdsi100194366b.149.2024.05.31.07.52.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 07:52:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SpihBMpm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-197010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id D854B1F2841E for ; Fri, 31 May 2024 14:52:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EF0D57888; Fri, 31 May 2024 14:51:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SpihBMpm" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 47F1854656 for ; Fri, 31 May 2024 14:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717167094; cv=none; b=fllwBHtreV4bAuAzO6LXH3iJtkVn0NYl/QDy3JiCKGkbjp4VR6yF8z0EA3P2dUpoFEtIBySvA+IosSm1hf/d1q5SZB7llUDW7YH8ZdRDRK7JtKrrOIavsZr3bwf0ag7l44vt9KWR3d4y8WD70sRpTXEmQs6dx2QaECoVpBwPPTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717167094; c=relaxed/simple; bh=7h1JHvMSQCNajOTO0q9gdjzOivHbmkPn9GprPw6QZ2k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kT7Zq4iMa32b0j+BcXOSCw0yXFkjKrVYQYqWLGks4/2C/scWkJGfw55WJJYb/BXatsyBNZZB/+VMMGP+B3wCkNiNRxarff4R82GXM6wzjlEPIx6BPClqd/ENiqTmHXmRbemB9WBSwLPOFHQ4hBxaGQm6dDUVBv2tV8+RAHKosII= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SpihBMpm; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717167094; x=1748703094; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=7h1JHvMSQCNajOTO0q9gdjzOivHbmkPn9GprPw6QZ2k=; b=SpihBMpm6WLF8iccDYkCIbEmaE9VngWI6Vn4z4xIuqS66XaFZFu6ZVJI BgZLA2jJgz+Ov5VkxPS4KZdHIXv8dn4CyoeDJ40Z2x1VtxhOkT3s2dIe8 xXa/Ec2bjoQmD+XB8lb8Fv2zeeDPegYilXZlktiX1xf4CXAGwrQruRdcL Dh5xaPmnWFuikvY7JKJxpjrQT6ko0s3KH6TU3RvoMlEjv0/yvmP/ffWU5 GkkO10sROqD7cINGWPvO1+oqHCLfVcF1wHFCtERo+Tv+fTaQCID44/pGb /s1ChVHhY2wMX3Fus6aTxEh8+scRmmKU5tsuRCrNcDn4kovkrSmMqEq6O A==; X-CSE-ConnectionGUID: j2obHVpZSJ2kaoVgUwgSuw== X-CSE-MsgGUID: eWPpoUEgQqa8KGMJXyYdUg== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="17543190" X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="17543190" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 07:51:33 -0700 X-CSE-ConnectionGUID: ueK8RTKKTAOv+0hkDjmfLA== X-CSE-MsgGUID: duUR3BGmS4yumL5UGdQhqA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="36766507" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa008.jf.intel.com with ESMTP; 31 May 2024 07:51:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 998A5228; Fri, 31 May 2024 17:51:30 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/1] driver core: device.h: Group of_node handling declarations and definitions Date: Fri, 31 May 2024 17:51:29 +0300 Message-ID: <20240531145129.1506733-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit There are a few of_node related APIs defined in the driver core. Group the respective declarations and definitions in the header. There is no functional change. Signed-off-by: Andy Shevchenko --- include/linux/device.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index fc3bd7116ab9..56f266429229 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1031,13 +1031,6 @@ static inline void device_lock_assert(struct device *dev) lockdep_assert_held(&dev->mutex); } -static inline struct device_node *dev_of_node(struct device *dev) -{ - if (!IS_ENABLED(CONFIG_OF) || !dev) - return NULL; - return dev->of_node; -} - static inline bool dev_has_sync_state(struct device *dev) { if (!dev) @@ -1144,10 +1137,18 @@ void unlock_device_hotplug(void); int lock_device_hotplug_sysfs(void); int device_offline(struct device *dev); int device_online(struct device *dev); + void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode); void set_secondary_fwnode(struct device *dev, struct fwnode_handle *fwnode); -void device_set_of_node_from_dev(struct device *dev, const struct device *dev2); void device_set_node(struct device *dev, struct fwnode_handle *fwnode); +void device_set_of_node_from_dev(struct device *dev, const struct device *dev2); + +static inline struct device_node *dev_of_node(struct device *dev) +{ + if (!IS_ENABLED(CONFIG_OF) || !dev) + return NULL; + return dev->of_node; +} static inline int dev_num_vf(struct device *dev) { -- 2.43.0.rc1.1336.g36b5255a03ac