From: Chander Kashyap Date: Thu, 22 May 2014 05:06:26 +0000 (+0530) Subject: PM / OPP: discard duplicate OPPs X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~5^2~3^5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64ce854578de82e9e16280298562721ced971668;p=pandora-kernel.git PM / OPP: discard duplicate OPPs We don't have any protection against addition of duplicate OPPs currently and in case some code tries to add them, it will end up corrupting OPP tables. We need to handle some duplication cases separately as returning error might not be the right thing always. The new list of return values for dev_pm_opp_add() are: 0: On success OR Duplicate OPPs (both freq and volt are same) and opp->available -EEXIST: Freq are same and volt are different OR Duplicate OPPs (both freq and volt are same) and !opp->available -ENOMEM: Memory allocation failure Acked-by: Nishanth Menon Signed-off-by: Chander Kashyap Signed-off-by: Inderpal Singh Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed