summaryrefslogtreecommitdiffstats
path: root/drivers/auxdisplay
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-09-30 15:26:42 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-10-03 12:07:09 +0200
commite6fc7ef72bf2272d65d97e1b78024d686107d82e (patch)
tree093c750daf50015fd277a9d1dd875d9df251a17b /drivers/auxdisplay
parentauxdisplay: Drop explicit initialization of struct i2c_device_id::driver_data... (diff)
downloadlinux-e6fc7ef72bf2272d65d97e1b78024d686107d82e.tar.xz
linux-e6fc7ef72bf2272d65d97e1b78024d686107d82e.zip
auxdisplay: ht16k33: Make use of i2c_get_match_data()
Get matching data in one step by switching to use i2c_get_match_data(). As a positive side effect the I²C ID table is in sync of OF one. Reviewed-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r--drivers/auxdisplay/ht16k33.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index b00012a556fb..96ad9e972bd7 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -657,7 +657,6 @@ static int ht16k33_seg_probe(struct device *dev, struct ht16k33_priv *priv,
static int ht16k33_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
- const struct of_device_id *id;
struct ht16k33_priv *priv;
uint32_t dft_brightness;
int err;
@@ -672,9 +671,8 @@ static int ht16k33_probe(struct i2c_client *client)
return -ENOMEM;
priv->client = client;
- id = i2c_of_match_device(dev->driver->of_match_table, client);
- if (id)
- priv->type = (uintptr_t)id->data;
+ priv->type = (uintptr_t)i2c_get_match_data(client);
+
i2c_set_clientdata(client, priv);
err = ht16k33_initialize(priv);
@@ -747,7 +745,9 @@ static void ht16k33_remove(struct i2c_client *client)
}
static const struct i2c_device_id ht16k33_i2c_match[] = {
- { "ht16k33" },
+ { "3108", DISP_QUAD_7SEG },
+ { "3130", DISP_QUAD_14SEG },
+ { "ht16k33", DISP_MATRIX },
{ }
};
MODULE_DEVICE_TABLE(i2c, ht16k33_i2c_match);