Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2383704lqb; Mon, 27 May 2024 19:21:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsOX2ZrI6p+xgaZkV50ZddzQ37XOpfd/SXofrDKIxnwUDE1mwOj8fyDVeZGGtZWoU8lBQWoWNBNTQWh7dqQbB4DuD3gkwC8weZc6VA7g== X-Google-Smtp-Source: AGHT+IFm5eh4tARCF9OuS+me1Dl4NUTzQWgLoApshO4LH0gm2AmP3jUBsiu2187eO5wAHG2EuSpu X-Received: by 2002:a05:622a:1a10:b0:43c:8612:8191 with SMTP id d75a77b69052e-43fa7455e1bmr271829201cf.8.1716862905032; Mon, 27 May 2024 19:21:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716862905; cv=pass; d=google.com; s=arc-20160816; b=iVQYW5Gzd+CYCHU79dbjHKQkXhusTWDjUPMfQu9ihFRscjqUGLF+e7n4hHw7jMvlKx 3g5s22Bx79pjIWAY6RMBbVukqkwgFkcwJ5pKKKTA0zQxmStDNPIcoELHcvXlFJRTyrQP J3FXVShB64rNDWIOPyPaphDN9HN+PwzeKAETmSN1LE329gdTwJu9aXANasH4+OGJzfHF IO6mP/0jd0PBaU+E/frnz7JB+VZk+qMZhtPfrWV0YCfBnhppb2LBgmUD5F7b+zFeEGVn 5QL14WwzzU7bONO1DAbY5vkOyQPiCPvwcQF0q9nqRPgaDNczgEfAho71bWLu41V6gBbS CuPw== 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=0we11RHJ5SMvQ0jZ1olNKjxA2tY8qkbM1DzXRBLpUSk=; fh=jQUNAuWlXATPo4YcEj7zFnyeK2nlFvC3fiWVbu+C/uI=; b=RxoWdt/OIP2oWy2XqZ1ETM5TGn6BCRjGxWvJ7RpPG/89CyxaUbszGXEMhC+6c1uaKt qGnp/rTOEC/12FAWVbASv8xBpJihaeD9D21EtRLSIe4YE5wpKkTxduCZfR9xrVMDLAkU 77VafG1CU2GDqfvWCpv6w8l1TK2wNfhfGRTg8C7sx1eZPuZraIJi+UufLwk1sJHTd/qg PaPWumqmpHjwGVVhhbr2EGM3x6nzjfzt38FCzMTrrLdgUk7Lx4N0k4DGCTS6jWFEi1v7 0Cjev/4PFlkH1p1OgxD3zgMdr90oIETHK/GSteNZDPEglYBo4y+JsXGZI9vTk30aw0Xk 82iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cA+9oh26; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191646-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18ca7cfsi91263631cf.694.2024.05.27.19.21.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 19:21:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191646-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cA+9oh26; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191646-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191646-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BBCE31C21906 for ; Tue, 28 May 2024 02:21:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D9D46D1A9; Tue, 28 May 2024 02:19:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cA+9oh26" 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 691E36A33B; Tue, 28 May 2024 02:19:19 +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=1716862759; cv=none; b=fdEl65yH1FYDpzEdLiPdlucrMY6ckXC7ycIDE9M8uTggdJUb6/lP2EjxrQtn5RKBHIxW7bj2jtsxW9Dg2uXQJ+Ad9HwHNSb1pPPx5WdoBDhrY/low+vlWV6y/2M0se3c3cR5Bt9eQUHfooEWQ3RUOgVYPCXUjeGWW8tHsjH5ey8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862759; c=relaxed/simple; bh=FZCY3iTAJh1S9EP9/Qn1j7myPIFxD/sPPvDvlpMXCJA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qLOjTkUHVYXN6yFgIcj1VzpriSpEkX/jAeGfSvzC7kKYZcKoaoBxLFZi4XgFqmTRSVzxQ3qA1FSJfOieVCkt85Ko2PfGzk+V+THuONjOyGxYJVQ9tUNanTae4LKpZ/jkUh2QwtB+PLxLzZ1q9dro/dMHkJkCogCAwErbYUMMFIg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cA+9oh26; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18A08C2BBFC; Tue, 28 May 2024 02:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716862759; bh=FZCY3iTAJh1S9EP9/Qn1j7myPIFxD/sPPvDvlpMXCJA=; h=From:To:Cc:Subject:Date:From; b=cA+9oh26Gf7hQZEyhiH7EFDBKi1xAeUnU0CEzV1PMcFyZxOFJt8G26F1lmhtL52QT +KBx3u9PjqAIXhJt4/PwH1S/2nQOFM5Io8N5B7rfKbJJXfE8/cSbPx6K9lHqCnLsVS ouBp4ZRzs19sAaxWnx+ZvKb4i5noTlOfYanCUhUYRhfZoLsKfkrVuBjp34ISlg93Ze yhPuauGxZ3mE6U6tPg5DcMeLZeUbUPDzg7A0hrYUR0UsMcKKZ5Zib8KL4pgA5WOrQs z3apg/PhLzgEjKNN8PKVr+CEUjkAsvnDAVh5OinRM3U0BP59EmbDsAtbP+oSfTO5vQ Mv+GhiggCKPkg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tzung-Bi Shih , Benson Leung , Prashant Malani , Krzysztof Kozlowski , Sebastian Reichel , Sasha Levin , sre@kernel.org, linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 1/2] power: supply: cros_usbpd: provide ID table for avoiding fallback match Date: Mon, 27 May 2024 22:19:13 -0400 Message-ID: <20240528021915.3905424-1-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 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 5.15.160 Content-Transfer-Encoding: 8bit From: Tzung-Bi Shih [ Upstream commit 0f8678c34cbfdc63569a9b0ede1fe235ec6ec693 ] 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: Prashant Malani Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20240401030052.2887845-4-tzungbi@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c index 0a4f02e4ae7ba..d7ee1eb9ca880 100644 --- a/drivers/power/supply/cros_usbpd-charger.c +++ b/drivers/power/supply/cros_usbpd-charger.c @@ -5,6 +5,7 @@ * Copyright (c) 2014 - 2018 Google, Inc */ +#include #include #include #include @@ -711,16 +712,22 @@ static int cros_usbpd_charger_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL, cros_usbpd_charger_resume); +static const struct platform_device_id cros_usbpd_charger_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_charger_id); + static struct platform_driver cros_usbpd_charger_driver = { .driver = { .name = DRV_NAME, .pm = &cros_usbpd_charger_pm_ops, }, - .probe = cros_usbpd_charger_probe + .probe = cros_usbpd_charger_probe, + .id_table = cros_usbpd_charger_id, }; module_platform_driver(cros_usbpd_charger_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ChromeOS EC USBPD charger"); -MODULE_ALIAS("platform:" DRV_NAME); -- 2.43.0