OSDN Git Service

rtc: pcf85063: Simplify probe()
authorBiju Das <biju.das.jz@bp.renesas.com>
Mon, 17 Jul 2023 12:40:58 +0000 (13:40 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 27 Jul 2023 21:07:50 +0000 (23:07 +0200)
commit68c624f860b30408afde81a91b4c9df3e915ed85
treebb56836540431a39b1b4095659524f733c41fd9e
parentb7f73b6e921b457a222e86cf53fe3950c6b5aed5
rtc: pcf85063: Simplify probe()

The pcf85063_ids[].driver_data could store a pointer to the config,
like for DT-based matching, making I2C and DT-based matching
more similar.

After that, we can simplify the probe() by replacing of_device_get_
match_data() and i2c_match_id() by i2c_get_match_data() as we have
similar I2C and DT-based matching table.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230717124059.196244-2-biju.das.jz@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pcf85063.c