Commit 76aa3de7 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski

eeprom: at24: fix retrieving the at24_chip_data structure

Commit feb2f19b ("eeprom: at24: move platform data processing into
a separate routine") introduced a bug where we incorrectly retireve the
at24_chip_data structure. Remove the unnecessary ampersand operator.

Fixes: feb2f19b ("eeprom: at24: move platform data processing into a separate routine")
Reported-by: default avatarVadim Pasternak <vadimp@mellanox.com>
Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
parent 75bc37fe
...@@ -518,7 +518,7 @@ static int at24_get_pdata(struct device *dev, struct at24_platform_data *pdata) ...@@ -518,7 +518,7 @@ static int at24_get_pdata(struct device *dev, struct at24_platform_data *pdata)
if (of_node && of_match_device(at24_of_match, dev)) if (of_node && of_match_device(at24_of_match, dev))
cdata = of_device_get_match_data(dev); cdata = of_device_get_match_data(dev);
else if (id) else if (id)
cdata = (void *)&id->driver_data; cdata = (void *)id->driver_data;
else else
cdata = acpi_device_get_match_data(dev); cdata = acpi_device_get_match_data(dev);
......
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