--- v9
+++ v13
@@ -9,10 +9,10 @@
1 file changed, 45 insertions(+)
diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
-index 24c4ec4e453a..c81bdcda76d4 100644
+index 2eee21f275c9d..c49ec001212bf 100644
--- a/drivers/hid/hid-nintendo.c
+++ b/drivers/hid/hid-nintendo.c
-@@ -313,6 +313,8 @@ struct joycon_ctlr {
+@@ -319,6 +319,8 @@ struct joycon_ctlr {
struct led_classdev home_led;
enum joycon_ctlr_state ctlr_state;
spinlock_t lock;
@@ -21,7 +21,7 @@
/* The following members are used for synchronous sends/receives */
enum joycon_msg_type msg_type;
-@@ -970,6 +972,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr)
+@@ -1005,6 +1007,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr)
ctlr->input->id.vendor = hdev->vendor;
ctlr->input->id.product = hdev->product;
ctlr->input->id.version = hdev->version;
@@ -29,8 +29,8 @@
ctlr->input->name = name;
input_set_drvdata(ctlr->input, ctlr);
-@@ -1250,6 +1253,41 @@ static int joycon_power_supply_create(struct joycon_ctlr *ctlr)
- return 0;
+@@ -1317,6 +1320,41 @@ static int joycon_power_supply_create(struct joycon_ctlr *ctlr)
+ return power_supply_powers(ctlr->battery, &hdev->dev);
}
+static int joycon_read_mac(struct joycon_ctlr *ctlr)
@@ -71,7 +71,7 @@
/* Common handler for parsing inputs */
static int joycon_ctlr_read_handler(struct joycon_ctlr *ctlr, u8 *data,
int size)
-@@ -1428,6 +1466,13 @@ static int nintendo_hid_probe(struct hid_device *hdev,
+@@ -1493,6 +1531,13 @@ static int nintendo_hid_probe(struct hid_device *hdev,
goto err_mutex;
}
@@ -79,12 +79,12 @@
+ if (ret) {
+ hid_err(hdev, "Failed to retrieve controller MAC; ret=%d\n",
+ ret);
-+ goto err_close;
++ goto err_mutex;
+ }
+
mutex_unlock(&ctlr->output_mutex);
- ret = joycon_input_create(ctlr);
+ /* Initialize the leds */
--
-2.23.0
+2.31.1