cpufreq: ti-cpufreq: Only register platform_device when supported
authorDave Gerlach <d-gerlach@ti.com>
Tue, 13 Nov 2018 19:30:40 +0000 (13:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:13 +0000 (09:16 +0100)
commit0799feafeb1b633442432810d8107fb0367dc37a
tree06e30ed7847c56d6a5fa8bc837aee56ddb984f4e
parent1a488242d942c12014f333a6c2a98082882f6707
cpufreq: ti-cpufreq: Only register platform_device when supported

[ Upstream commit d98ccfc3948ab63152494bb6b9c17e15295c0310 ]

Currently the ti-cpufreq driver blindly registers a 'ti-cpufreq' to force
the driver to probe on any platforms where the driver is built in.
However, this should only happen on platforms that actually can make use
of the driver. There is already functionality in place to match the
SoC compatible so let's factor this out into a separate call and
make sure we find a match before creating the ti-cpufreq platform device.

Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/ti-cpufreq.c