public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Camel Guo <camel.guo@axis.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.4 02/43] hwmon: (tmp401) Add OF device ID table
Date: Mon, 16 May 2022 21:36:13 +0200	[thread overview]
Message-ID: <20220516193614.788971257@linuxfoundation.org> (raw)
In-Reply-To: <20220516193614.714657361@linuxfoundation.org>

From: Camel Guo <camel.guo@axis.com>

[ Upstream commit 3481551f035725fdc46885425eac3ef9b58ae7b7 ]

This driver doesn't have of_match_table. This makes the kernel module
tmp401.ko lack alias patterns (e.g: of:N*T*Cti,tmp411) to match DT node
of the supported devices hence this kernel module will not be
automatically loaded.

After adding of_match_table to this driver, the folllowing alias will be
added into tmp401.ko.
$ modinfo drivers/hwmon/tmp401.ko
filename: drivers/hwmon/tmp401.ko
......
author:         Hans de Goede <hdegoede@redhat.com>
alias:          of:N*T*Cti,tmp435C*
alias:          of:N*T*Cti,tmp435
alias:          of:N*T*Cti,tmp432C*
alias:          of:N*T*Cti,tmp432
alias:          of:N*T*Cti,tmp431C*
alias:          of:N*T*Cti,tmp431
alias:          of:N*T*Cti,tmp411C*
alias:          of:N*T*Cti,tmp411
alias:          of:N*T*Cti,tmp401C*
alias:          of:N*T*Cti,tmp401
......

Fixes: af503716ac14 ("i2c: core: report OF style module alias for devices registered via OF")
Signed-off-by: Camel Guo <camel.guo@axis.com>
Link: https://lore.kernel.org/r/20220503114333.456476-1-camel.guo@axis.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hwmon/tmp401.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c
index fa361d9949db..debcece02dd3 100644
--- a/drivers/hwmon/tmp401.c
+++ b/drivers/hwmon/tmp401.c
@@ -731,10 +731,21 @@ static int tmp401_probe(struct i2c_client *client,
 	return 0;
 }
 
+static const struct of_device_id __maybe_unused tmp4xx_of_match[] = {
+	{ .compatible = "ti,tmp401", },
+	{ .compatible = "ti,tmp411", },
+	{ .compatible = "ti,tmp431", },
+	{ .compatible = "ti,tmp432", },
+	{ .compatible = "ti,tmp435", },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, tmp4xx_of_match);
+
 static struct i2c_driver tmp401_driver = {
 	.class		= I2C_CLASS_HWMON,
 	.driver = {
 		.name	= "tmp401",
+		.of_match_table = of_match_ptr(tmp4xx_of_match),
 	},
 	.probe		= tmp401_probe,
 	.id_table	= tmp401_id,
-- 
2.35.1




  parent reply	other threads:[~2022-05-16 19:49 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 19:36 [PATCH 5.4 00/43] 5.4.195-rc1 review Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 01/43] batman-adv: Dont skb_split skbuffs with frag_list Greg Kroah-Hartman
2022-05-16 19:36 ` Greg Kroah-Hartman [this message]
2022-05-16 19:36 ` [PATCH 5.4 03/43] mac80211: Reset MBSSID parameters upon connection Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 04/43] net: Fix features skip in for_each_netdev_feature() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 05/43] ipv4: drop dst in multicast routing path Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 06/43] drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 07/43] netlink: do not reset transport header in netlink_recvmsg() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 08/43] mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 09/43] dim: initialize all struct fields Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 10/43] hwmon: (ltq-cputemp) restrict it to SOC_XWAY Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 11/43] s390/ctcm: fix variable dereferenced before check Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 12/43] s390/ctcm: fix potential memory leak Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 13/43] s390/lcs: fix variable dereferenced before check Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 14/43] net/sched: act_pedit: really ensure the skb is writable Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 15/43] net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 16/43] net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 17/43] gfs2: Fix filesystem block deallocation for short writes Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 18/43] hwmon: (f71882fg) Fix negative temperature Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 19/43] ASoC: max98090: Reject invalid values in custom control put() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 20/43] ASoC: max98090: Generate notifications on changes for custom control Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 21/43] ASoC: ops: Validate input values in snd_soc_put_volsw_range() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 22/43] s390: disable -Warray-bounds Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 23/43] net: emaclite: Dont advertise 1000BASE-T and do auto negotiation Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 24/43] tcp: resalt the secret every 10 seconds Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 25/43] tty: n_gsm: fix mux activation issues in gsm_config() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 26/43] usb: cdc-wdm: fix reading stuck on device close Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 27/43] usb: typec: tcpci: Dont skip cleanup in .remove() on error Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 28/43] USB: serial: pl2303: add device id for HP LM930 Display Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 29/43] USB: serial: qcserial: add support for Sierra Wireless EM7590 Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 30/43] USB: serial: option: add Fibocom L610 modem Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 31/43] USB: serial: option: add Fibocom MA510 modem Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 32/43] slimbus: qcom: Fix IRQ check in qcom_slim_probe Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 33/43] serial: 8250_mtk: Fix UART_EFR register address Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 34/43] serial: 8250_mtk: Fix register address for XON/XOFF character Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 35/43] drm/nouveau/tegra: Stop using iommu_present() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 36/43] i40e: i40e_main: fix a missing check on list iterator Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 37/43] cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp() Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 38/43] drm/vmwgfx: Initialize drm_mode_fb_cmd2 Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 39/43] MIPS: fix build with gcc-12 Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 40/43] net: phy: Fix race condition on link status change Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 41/43] arm[64]/memremap: dont abuse pfn_valid() to ensure presence of linear map Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 42/43] ping: fix address binding wrt vrf Greg Kroah-Hartman
2022-05-16 19:36 ` [PATCH 5.4 43/43] tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe() Greg Kroah-Hartman
2022-05-17  3:25 ` [PATCH 5.4 00/43] 5.4.195-rc1 review Florian Fainelli
2022-05-17  4:12 ` Shuah Khan
2022-05-17 11:01 ` Sudip Mukherjee
2022-05-17 13:07 ` Samuel Zou
2022-05-17 14:16 ` Naresh Kamboju
2022-05-17 19:30 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220516193614.788971257@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=camel.guo@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox