power: supply: axp20x_usb_power: Use a match structure
authorSamuel Holland <samuel@sholland.org>
Wed, 15 Jan 2020 03:40:45 +0000 (21:40 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 15 Jan 2020 20:36:34 +0000 (21:36 +0100)
commit56900d4541a9e2e9263a2db9246e216edad5f928
tree3617deda0cd290924ffae7c377f1175eb3747d79
parent577233a3f5637aff40e376572d5ed24ff80204d0
power: supply: axp20x_usb_power: Use a match structure

Instead of ad-hoc variant ID checks throughout the code, let's start
moving the variant-specific details to a match structure. This allows
for future flexibility, and it better matches the other axp20x power
supply drivers.

This commit removes most variant checks from axp20x_usb_power_probe().
Other parts of the driver still do ID matching; they are left unchanged
for now.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/axp20x_usb_power.c