sunxi: driver refresh for 3.13
[openwrt.git] / target / linux / sunxi / patches-3.13 / 160-3-phy-core-no-module-build.patch
1 From 87c01c9ef0602abaa909771c6c6eab1f4c2c384d Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Tue, 11 Feb 2014 16:55:57 +0100
4 Subject: [PATCH] phy-core: Don't allow building phy-core as a module
5
6 include/phy/phy.h has stub code in there for when building without the
7 phy-core enabled. This is useful for generic drivers such as ahci-platform,
8 ehci-platoform and ohci-platform which have support for driving an optional
9 phy passed to them through the devicetree.
10
11 Since on some boards this phy functionality is not needed, being able to
12 disable the phy subsystem without needing a lot of #ifdef magic in the
13 driver using it is quite useful.
14
15 However this breaks when the module using the phy subsystem is build-in and
16 the phy-core is not, which leads to the build failing with missing symbol
17 errors in the linking stage of the zImage.
18
19 Which leads to gems such as this being added to the Kconfig for achi_platform:
20
21         depends on GENERIC_PHY || !GENERIC_PHY
22
23 Rather then duplicating this code in a lot of places using the phy-core,
24 I believe it is better to simply not allow the phy-core to be built as a
25 module. The phy core is quite small and has no external dependencies, so
26 always building it in when enabling it should not be an issue.
27
28 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
29 ---
30  drivers/phy/Kconfig | 2 +-
31  1 file changed, 1 insertion(+), 1 deletion(-)
32
33 diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
34 index afa2354..4ef8755 100644
35 --- a/drivers/phy/Kconfig
36 +++ b/drivers/phy/Kconfig
37 @@ -5,7 +5,7 @@
38  menu "PHY Subsystem"
39  
40  config GENERIC_PHY
41 -       tristate "PHY Core"
42 +       bool "PHY Core"
43         help
44           Generic PHY support.
45  
46 -- 
47 1.8.5.5
48