power: supply: max17042_battery: Always fall back to default platform-data
authorHans de Goede <hdegoede@redhat.com>
Mon, 22 Jan 2018 17:42:18 +0000 (18:42 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Tue, 23 Jan 2018 15:51:22 +0000 (16:51 +0100)
commit2d7e6a8376c0eaf260f54b265acadd2e185d7b82
treeb5cee38764ae38d82672d47d77d0e05494b7088e
parent6e5ab19d54e8cd7bdc779db0b807403558dbea62
power: supply: max17042_battery: Always fall back to default platform-data

It is possible to have CONFIG_OF enabled on x86 builds, where we have no
firmware provided max17042_platform_data. The CONFIG_OF implementation of
max17042_get_pdata would return NULL in this case, causing the probe to
fail.

Instead always fallback to the default platform-data, as used on x86 sofar,
when there is no firmware provided pdata, independent of CONFIG_OF.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/max17042_battery.c