Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1473772lqb; Sun, 26 May 2024 02:43:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPedabUjL1d1vvMg/EuTH8Hu5hwPCCIlBAUaDo6WGecYAt6hC0lgDWmQScYFg2bJwDoHlKMMNEX/KeiOmjN+NlfKuVecY8WLi80E9mnw== X-Google-Smtp-Source: AGHT+IE59KwZrYWpAP8BpsHR2qGQ0udcsqqpL0mozlr+8wDKHDsBrwXqVSTecGZGvG5vrcDyIeKo X-Received: by 2002:a50:d782:0:b0:578:69cb:1efc with SMTP id 4fb4d7f45d1cf-57869cb2015mr2743197a12.9.1716716639704; Sun, 26 May 2024 02:43:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716716639; cv=pass; d=google.com; s=arc-20160816; b=Fm0W3AagHXdlMh0BeBzwUWcWeb0IK83HBzMUAZyAfxPmfr7vGq0TitSMx9O+WJ/aRF 0fXYgocdXiPuNVVSxAVuXWDjn/9+wipnxknim44J2eCvGWQssNWyY0oh5cmCQtFXoCmk WvhWhXlExfVXCIMr08Jll0aFaqrFNGf5b5UGqnU9Tz1+3GOZcYbLsEROO35XAyTLBvnK beEZyBan4VQxjRJAqNJzQEGGblVuppr0B4dgALUO8mZmz0bG3s+L0hRTEoN/S/RvIbLI uabL0Mx+M5KqejkFRzpwaHlcezlsqGGwEgPAbuoSAA9ZNWJBpASRidH9Uu+jJ8oqI2ti zBjA== 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=n73nkdIpqkIX2hepv+/fN1CRO17kVmtcKZyo57aoa14=; fh=qBG97vB9tlAP7sS+nGJ3OuiTbhe6p/qZbfKhGMnQpUM=; b=JKcLv09PHvgpJ8iGR8B8cXhzw0e/7Ts3zipYJzsbxyVOtPCe9nOpMENivsvxXGaq0i /U3Tzhmc6JQd21IVy5z7Z6JK2QaDmOspkLwV6M6mVC4nFPppM05Fb6CAT9RDZ4tU8FWw kp2u6CiiZwBatMZXrvw34HTvp4vYq5dBJIzgsf7I1aGAT0J12kJShuaQWS9SqQoHQ54f Ok32ABcuqD2katmofFNGZqv1x1Ulu/x6ncvg5KCAjlu2/sgz3N3sA5NNNTZheDu/3be2 WZaZ9Jab42qSsFY+Z5PDPowySvu0N/ZeRasRs9UIt5Sn3AO2DOVCk3OUHSvt85Nu7VxT wd4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OPVcVC8L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189651-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-578524b15ddsi2761074a12.486.2024.05.26.02.43.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 02:43:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189651-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=@kernel.org header.s=k20201202 header.b=OPVcVC8L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189651-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189651-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7343D1F2111C for ; Sun, 26 May 2024 09:43:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB7D422301; Sun, 26 May 2024 09:42:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OPVcVC8L" 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 DF75F20B02; Sun, 26 May 2024 09:42:08 +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=1716716529; cv=none; b=oCphnj8DMqtg4gyY9MKUo1WKmk6El2uQjibXztoBFhpWUYh7PNwn4BI5hbqW3nCVh7/+7pI3jCoakvVXgwGhSk/ZcYDM4/gKQ7QujYv5HGFsMypM3bLLvvrr82ExCLxRoOADz5XCi5MgYCPBxQcBoTALU9vF3ltOfgwtjRZT10Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716716529; c=relaxed/simple; bh=af/ol9iL4gMIhU2wLPXuPquFvHSnfZuzbvNlF9lJ1ZI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VO8YEUlKxEpOwj9FS4e5+c7rjaWX0eGCY0zR8khfeSE75thlqwBOvXa5EH6AtOXOUf9ntPkgJjZZi9Fp6QD/SVQuV1Q/U8EGIsPTqdpF6hDJ/sgQ6mEvONCltcnc78SnBpzvnZFyj1nT82GRPOh7KL292tYg89XA1WYNXy+uQAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OPVcVC8L; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1298C32781; Sun, 26 May 2024 09:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716716528; bh=af/ol9iL4gMIhU2wLPXuPquFvHSnfZuzbvNlF9lJ1ZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OPVcVC8LtOzuK/gIEVhCldNm9mIpQRz9hSRoIpPohYGaV7q12Bo6DBxRE2V6JaFR9 g4fpP+4R64JSYKfen3ls4ezI4JPDm+JH7D9fl/q2pkwUeu5G6zUUOED99y8Ly4p2De e9dxz8ry/oFs3q2fY2/imA/QmM3VLEV+SZ18Kh52M8p4Vb2C4twLmFGze5sDQWnEGe HEVluyheznLvn9b5la+KuSer9AyZRDBbiqUVBuf67KtoBBqQtqUrbQjYsfu+m2I7h0 pUnVZwJes45nTG3YS6eV3J/NTmf8NF0d/cbU6QMoCU76mW01xAfSn9yBNAKmgOomQi O6URJdd+fpXfg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tzung-Bi Shih , Benson Leung , Krzysztof Kozlowski , Sasha Levin , chrome-platform@lists.linux.dev Subject: [PATCH AUTOSEL 6.9 10/15] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match Date: Sun, 26 May 2024 05:41:42 -0400 Message-ID: <20240526094152.3412316-10-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240526094152.3412316-1-sashal@kernel.org> References: <20240526094152.3412316-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.9.1 Content-Transfer-Encoding: 8bit From: Tzung-Bi Shih [ Upstream commit e0e59c5335a0a038058a080474c34fe04debff33 ] Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Reviewed-by: Benson Leung Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240329075630.2069474-7-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_usbpd_logger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_usbpd_logger.c b/drivers/platform/chrome/cros_usbpd_logger.c index f618757f8b321..930c2f47269f6 100644 --- a/drivers/platform/chrome/cros_usbpd_logger.c +++ b/drivers/platform/chrome/cros_usbpd_logger.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -249,6 +250,12 @@ static int __maybe_unused cros_usbpd_logger_suspend(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_logger_pm_ops, cros_usbpd_logger_suspend, cros_usbpd_logger_resume); +static const struct platform_device_id cros_usbpd_logger_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_logger_id); + static struct platform_driver cros_usbpd_logger_driver = { .driver = { .name = DRV_NAME, @@ -256,10 +263,10 @@ static struct platform_driver cros_usbpd_logger_driver = { }, .probe = cros_usbpd_logger_probe, .remove_new = cros_usbpd_logger_remove, + .id_table = cros_usbpd_logger_id, }; module_platform_driver(cros_usbpd_logger_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Logging driver for ChromeOS EC USBPD Charger."); -MODULE_ALIAS("platform:" DRV_NAME); -- 2.43.0