Commit 842fec05 authored by Thomas Schneider's avatar Thomas Schneider Committed by Jiri Kosina

HID: nintendo: Set phys property of input device based on HID phys

While the MAC address the uniq identifier is set to (cf. commit
14252473 ("HID: nintendo: set controller uniq to MAC")) is certainly
unique, the physical location can be more helpful in user interfaces.  The
underlying hid_device already provides a suitable value, so we can simply
reuse this here.
Signed-off-by: default avatarThomas Schneider <qsx@chaotikum.eu>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent aa051d36
...@@ -1634,6 +1634,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr) ...@@ -1634,6 +1634,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr)
ctlr->input->id.version = hdev->version; ctlr->input->id.version = hdev->version;
ctlr->input->uniq = ctlr->mac_addr_str; ctlr->input->uniq = ctlr->mac_addr_str;
ctlr->input->name = name; ctlr->input->name = name;
ctlr->input->phys = hdev->phys;
input_set_drvdata(ctlr->input, ctlr); input_set_drvdata(ctlr->input, ctlr);
/* set up sticks and buttons */ /* set up sticks and buttons */
...@@ -1713,6 +1714,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr) ...@@ -1713,6 +1714,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr)
ctlr->imu_input->id.version = hdev->version; ctlr->imu_input->id.version = hdev->version;
ctlr->imu_input->uniq = ctlr->mac_addr_str; ctlr->imu_input->uniq = ctlr->mac_addr_str;
ctlr->imu_input->name = imu_name; ctlr->imu_input->name = imu_name;
ctlr->imu_input->phys = hdev->phys;
input_set_drvdata(ctlr->imu_input, ctlr); input_set_drvdata(ctlr->imu_input, ctlr);
/* configure imu axes */ /* configure imu axes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment