Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp326057lqp; Tue, 11 Jun 2024 06:01:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUs50Dl8ncH9nPwjEzt1WdiFSyD0Z3xtfCtbA+0LJuq0znrm48VrYbv011vQjhnyD7sELvP2M+D5YwCbXBHsCytvrLq3bPx3NqpQeDLSw== X-Google-Smtp-Source: AGHT+IHLZCr7Sk3vRBvhAtv/JKG7Ixej4h7cp4aSR42e+1Kgjde9IFLR1IIDfGYl74NQ7kxA74F+ X-Received: by 2002:a17:902:e84a:b0:1f7:1a9:bf05 with SMTP id d9443c01a7336-1f701a9c351mr88887205ad.53.1718110880231; Tue, 11 Jun 2024 06:01:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718110880; cv=pass; d=google.com; s=arc-20160816; b=fygb/Ws1dBJBBgiZVBkZdiOUcxQwmagO0LSYm8Br/4Ip0u10t+Ph3nxjzn7Q2OuXz5 4VgaCPqE/DcItrtA8fSv/qOvTPjP08eSAt2mcriUgaGLRzNsTOUiRwPEq1TKFIGHptV8 RHBjDgJqyRXjaIWvjGE4s3F/wB6aE8ycMDp1rkiRauHh5rcFoD5i2kky3nC3HPzUpumH 20T10YzhVpMA4zHZBfmlGz/b96buDGlM7K6otgP7SkQC8B5UtqSQCSXOOR1YSJh9Fwg0 UjTssI2P/kyo2S8ygJzi8hxmDqrdWaHI+tsZlipCEJzHV17QTAdcJd221OQQ+fVSxEIc vzfg== 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=4X4qdRjXsyOCPwRSHXdGWTFT7Z4B5SqGBgUqaQp0Hh4=; fh=jUXwtF0520eqoQ34ytTRmHhHfmU9hKCLubTc/MmAv2E=; b=j096wSn+bV803KhhKC0k02xUEKWaUqeOeMvV4OqzF2TyWlIneoyJ0CrF/q+KnA30qH PrNGh+J5MKLOyIJR5PqHkAfuYMDwu/NFSLnoQWkRkQ/9R3Npm9eyxQ9M/tgjvdUyigOF H2SvxF0XT62OnBwg+FmymENki6KdDNXkNjbj6I8G9tOOKWdK53Dm5yrwRMRoA65+Alec gRQfLINlTBtr92ZJ+2OrySJ1BQPR/J04QjE270wvdoHtTdsJRJmWv1Srt67YJAJofPHC zR8RVGBUB8p+CV09T9Ac1LLyufQDdUS1pftx3GNltDdUx5/3FqqHYEkcsJRemyeRvzoL oDsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yeOTu4Nw; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-209889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6f5732240si53999845ad.392.2024.06.11.06.01.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 06:01:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209889-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=@linuxfoundation.org header.s=korg header.b=yeOTu4Nw; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-209889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 B1BD52855AA for ; Tue, 11 Jun 2024 13:01:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5087517BB35; Tue, 11 Jun 2024 13:01:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yeOTu4Nw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2DEB938DD1 for ; Tue, 11 Jun 2024 13:01:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718110873; cv=none; b=NRMir1sImrFykafzmT8vzVi7Sv534P/G4YHfpGP52kxAquFbyaH6ZWbcGnVl96FGLLSikUkxk/EN0CQN5u4KXmm4RiRr27CDLTTLp13e/DDKpGr2bb7AOFELaiSH/intgeN00Ye5y28HmmHCYu7BNGbNNTcc1zBHk2n92i+Z/d0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718110873; c=relaxed/simple; bh=sB0+sZLP/Y2Sqmo8oadg2kS/jbqmOBdH66Ld8QA5FGA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GNXk+eUptMk0Y6xLAwsQRGjsOmpOcPvd5BHjXAPQNwroyStHJrTNTKBKXXVJQfaf4U95YMWHPDS0PWIhJ1/Rm9tQTomJ6jEGiKJpTR5pDYYYaFD+lweLyFm9S7VGZgmdRGA5yJec3aybZB5ckQAlH/YQgqoxqDFiiwWSgVKbH8s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yeOTu4Nw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AE75C2BD10; Tue, 11 Jun 2024 13:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718110872; bh=sB0+sZLP/Y2Sqmo8oadg2kS/jbqmOBdH66Ld8QA5FGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yeOTu4Nw5B/k9fiQpxL5S+CIpUCqo+iaPeqQO2fD0qZ+io7d92FuN7Z2IhPKrTH6K +pHmQbFPf4wjeBaekkTHVdlyTRpClIok/A9JLY1TUmU4aIMzRYjKV9ouk/FihB/fld coJT7ncjVwfxoWcyL2VUXPh9+2YMe8cOfTGkbX1s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH 2/6] driver core: platform: fix ups for constant struct device_driver Date: Tue, 11 Jun 2024 15:01:05 +0200 Message-ID: <20240611130103.3262749-8-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240611130103.3262749-7-gregkh@linuxfoundation.org> References: <20240611130103.3262749-7-gregkh@linuxfoundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2060; i=gregkh@linuxfoundation.org; h=from:subject; bh=sB0+sZLP/Y2Sqmo8oadg2kS/jbqmOBdH66Ld8QA5FGA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkZXhO1G6bd2xfCfka0/omXHMeB0MCDEufsxEvbLDPMJ p2afaa7I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbiocKw4HrT3Y5lr2uP1a15 77pope6hi3vv32WY71lUuMprj+q5I0ZbOPscg0QU8ouKAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Fix up a few places in the platform core code that can easily handle struct device_driver being constant. This is part of the work to make all struct device_driver pointers be constant. Cc: "Rafael J. Wysocki" Signed-off-by: Greg Kroah-Hartman --- drivers/base/platform.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index c8aa1be70526..a6884479f4ac 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -1122,7 +1122,7 @@ static int platform_legacy_resume(struct device *dev) int platform_pm_suspend(struct device *dev) { - struct device_driver *drv = dev->driver; + const struct device_driver *drv = dev->driver; int ret = 0; if (!drv) @@ -1140,7 +1140,7 @@ int platform_pm_suspend(struct device *dev) int platform_pm_resume(struct device *dev) { - struct device_driver *drv = dev->driver; + const struct device_driver *drv = dev->driver; int ret = 0; if (!drv) @@ -1162,7 +1162,7 @@ int platform_pm_resume(struct device *dev) int platform_pm_freeze(struct device *dev) { - struct device_driver *drv = dev->driver; + const struct device_driver *drv = dev->driver; int ret = 0; if (!drv) @@ -1180,7 +1180,7 @@ int platform_pm_freeze(struct device *dev) int platform_pm_thaw(struct device *dev) { - struct device_driver *drv = dev->driver; + const struct device_driver *drv = dev->driver; int ret = 0; if (!drv) @@ -1198,7 +1198,7 @@ int platform_pm_thaw(struct device *dev) int platform_pm_poweroff(struct device *dev) { - struct device_driver *drv = dev->driver; + const struct device_driver *drv = dev->driver; int ret = 0; if (!drv) @@ -1216,7 +1216,7 @@ int platform_pm_poweroff(struct device *dev) int platform_pm_restore(struct device *dev) { - struct device_driver *drv = dev->driver; + const struct device_driver *drv = dev->driver; int ret = 0; if (!drv) -- 2.45.2