]> git.ipfire.org Git - people/ms/linux.git/commit
PM / devfreq: rk3399_dmc: Fix duplicated opp table on reload.
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Fri, 15 Jun 2018 15:12:17 +0000 (17:12 +0200)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 18 Jul 2018 04:58:39 +0000 (13:58 +0900)
commitd6e98f3e6d825380b566dc59359917a116090154
treee321331f3c5a4a42212eb5a4a5a214d662b650e1
parent2c2cb1e6b05b90d55b4b943646faa3cfbdf78f6e
PM / devfreq: rk3399_dmc: Fix duplicated opp table on reload.

The opp table is not removed when the driver is unloaded neither when
there is an error within probe, so if the driver is reloaded the opp
core shows the following warning:

  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               200000000, volt: 900000, enabled: 1. New: freq: 200000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               400000000, volt: 900000, enabled: 1. New: freq: 400000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               666000000, volt: 900000, enabled: 1. New: freq: 666000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               800000000, volt: 900000, enabled: 1. New: freq: 800000000,
               volt: 900000, enabled: 1
  rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
               928000000, volt: 900000, enabled: 1. New: freq: 928000000,
               volt: 900000, enabled: 1

This patch fixes the error path in the probe function and adds a .remove
function to properly cleanup the opp table on unloading.

Fixes: 5a893e31a636c (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc)
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/rk3399_dmc.c