power: supply: cpcap-battery: use device_get_match_data() to simplify code
authorTang Bin <tangbin@cmss.chinamobile.com>
Tue, 28 Sep 2021 02:06:23 +0000 (10:06 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sat, 2 Oct 2021 15:58:38 +0000 (17:58 +0200)
commit0668281d329db2c21ba6494a7bfcb8331dd0f5fa
treeb356704733bcafce3c86bbcd2d41d057391386bc
parentd0c27c9211fef3ce8083cc3ad2ca3067d211edc9
power: supply: cpcap-battery: use device_get_match_data() to simplify code

In the function cpcap_battery_probe(), the driver only needs the
data object, so use device_get_match_data() instead, to make the
code cleaner.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-battery.c