OSDN Git Service

thermal/drivers/rcar_gen3_thermal: Create device local ops struct
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 8 Feb 2023 19:03:32 +0000 (20:03 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 15 Feb 2023 16:29:15 +0000 (17:29 +0100)
commitaef43e04937ea819c6c1b35030b48f06f73488e0
tree6e14e3ca9bb37fe430eb15dba64e154e32bd867b
parent1c63f8cd018db726e6cddcbb5abd069fab0e9cea
thermal/drivers/rcar_gen3_thermal: Create device local ops struct

The callback operations are modified on a driver global level. If one
device tree description do not define interrupts, the set_trips()
operation was disabled globally for all users of the driver.

Fix this by creating a device local copy of the operations structure and
modify the copy depending on what the device can do.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20230208190333.3159879-3-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/rcar_gen3_thermal.c