mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
platform/x86: fujitsu-tablet: Stop setting acpi_device_name/class()
The driver sets acpi_device_class() which is never read afterward, so make it stop doing that and drop the symbol defined specifically for this purpose. For consistency, also make it stop setting acpi_device_name() and add a name field to the "fujitsu" structure for storing the name string used during input class device initialization. While at it, use scnprintf() instead of snprintf() for populating the name and phys fields of the "fujitsu" structure. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/2378407.iZASKD2KPV@rafael.j.wysocki Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
e235507af5
commit
37b35c0654
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
#define MODULENAME "fujitsu-tablet"
|
||||
|
||||
#define ACPI_FUJITSU_CLASS "fujitsu"
|
||||
|
||||
#define INVERT_TABLET_MODE_BIT 0x01
|
||||
#define INVERT_DOCK_STATE_BIT 0x02
|
||||
#define FORCE_TABLET_MODE_IF_UNDOCK 0x04
|
||||
|
|
@ -160,6 +158,7 @@ static struct {
|
|||
struct fujitsu_config config;
|
||||
unsigned long prev_keymask;
|
||||
|
||||
char name[17];
|
||||
char phys[21];
|
||||
|
||||
int irq;
|
||||
|
|
@ -458,14 +457,10 @@ static int acpi_fujitsu_probe(struct platform_device *pdev)
|
|||
if (ACPI_FAILURE(status) || !fujitsu.irq || !fujitsu.io_base)
|
||||
return -ENODEV;
|
||||
|
||||
sprintf(acpi_device_name(adev), "Fujitsu %s", acpi_device_hid(adev));
|
||||
sprintf(acpi_device_class(adev), "%s", ACPI_FUJITSU_CLASS);
|
||||
scnprintf(fujitsu.name, sizeof(fujitsu.name), "Fujitsu %s", acpi_device_hid(adev));
|
||||
scnprintf(fujitsu.phys, sizeof(fujitsu.phys), "%s/input0", acpi_device_hid(adev));
|
||||
|
||||
snprintf(fujitsu.phys, sizeof(fujitsu.phys),
|
||||
"%s/input0", acpi_device_hid(adev));
|
||||
|
||||
error = input_fujitsu_setup(&pdev->dev,
|
||||
acpi_device_name(adev), fujitsu.phys);
|
||||
error = input_fujitsu_setup(&pdev->dev, fujitsu.name, fujitsu.phys);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user