]> git.baikalelectronics.ru Git - kernel.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)
commit1131d2af7c8f86a9395ae2d4604f4af20a21e112
treee321331f3c5a4a42212eb5a4a5a214d662b650e1
parentb9176194dd11a6617cd0f5466daf6a5add773876
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: f5d5aeec2a200 (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