diff --git a/target/linux/octeon/patches-5.4/0003-register_memory_accessor_functions_with_of_memory_accessor.patch b/target/linux/octeon/patches-5.4/0003-register_memory_accessor_functions_with_of_memory_accessor.patch index 7a484210b8..bec9f965f1 100644 --- a/target/linux/octeon/patches-5.4/0003-register_memory_accessor_functions_with_of_memory_accessor.patch +++ b/target/linux/octeon/patches-5.4/0003-register_memory_accessor_functions_with_of_memory_accessor.patch @@ -14,30 +14,29 @@ Signed-off-by: Abhishek Paliwal --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -23,6 +23,7 @@ - #include - #include - #include + #include + #include + #include +#include - /* - * I2C EEPROMs from most vendors are inexpensive and mostly interchangeable. -@@ -637,6 +638,9 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) - if (chip.setup) - chip.setup(&at24->macc, chip.context); + /* Address pointer is 16 bit. */ + #define AT24_FLAG_ADDR16 BIT(7) +@@ -720,6 +721,9 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) + byte_len, client->name, + writable ? "writable" : "read-only", at24->write_max); + if (client->dev.of_node) + of_memory_accessor_register(&client->dev, &at24->macc); + return 0; + } - err_clients: -@@ -655,6 +659,9 @@ static int at24_remove(struct i2c_client *client) - at24 = i2c_get_clientdata(client); - sysfs_remove_bin_file(&client->dev.kobj, &at24->bin); +@@ -728,5 +732,8 @@ static int at24_remove(struct i2c_client *client) + pm_runtime_disable(&client->dev); + pm_runtime_set_suspended(&client->dev); + if (client->dev.of_node) + of_memory_accessor_remove(&client->dev); + - for (i = 1; i < at24->num_addresses; i++) - i2c_unregister_device(at24->client[i]); - + return 0; + }