Skip to content

Commit

Permalink
HID: intel-ish-hid: use constants for modaliases
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Thomas Weißschuh authored and Jiri Kosina committed Nov 9, 2021
1 parent fa443bc commit cb1a2c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/intel-ish-hid/ishtp/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
{
int len;

len = snprintf(buf, PAGE_SIZE, "ishtp:%s\n", dev_name(dev));
len = snprintf(buf, PAGE_SIZE, ISHTP_MODULE_PREFIX "%s\n", dev_name(dev));
return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
}
static DEVICE_ATTR_RO(modalias);
Expand All @@ -363,7 +363,7 @@ ATTRIBUTE_GROUPS(ishtp_cl_dev);

static int ishtp_cl_uevent(struct device *dev, struct kobj_uevent_env *env)
{
if (add_uevent_var(env, "MODALIAS=ishtp:%s", dev_name(dev)))
if (add_uevent_var(env, "MODALIAS=" ISHTP_MODULE_PREFIX "%s", dev_name(dev)))
return -ENOMEM;
return 0;
}
Expand Down

0 comments on commit cb1a2c6

Please sign in to comment.