aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/arm/mach-omap2/sr_device.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2021-03-12 10:11:24 +0200
committerTony Lindgren <tony@atomide.com>2021-03-12 10:11:24 +0200
commitf21af4257cf3ec82736083dabc5fa230efebf61c (patch)
tree1a061c2189903bc651e4023643c6dac533102450 /arch/arm/mach-omap2/sr_device.c
parentMerge branches 'omap-for-v5.13/genpd-dra7', 'omap-for-v5.13/genpd-omap4' and 'omap-for-v5.13/genpd-omap5' into omap-for-v5.13/genpd-drop-legacy (diff)
downloadwireguard-linux-f21af4257cf3ec82736083dabc5fa230efebf61c.tar.xz
wireguard-linux-f21af4257cf3ec82736083dabc5fa230efebf61c.zip
ARM: OMAP2+: Stop building legacy code for dra7 and omap4/5
With the recent changes we are now booting am3/4, dra7, and omap4/5 without legacy data using devicetree, simple-pm-bus and genpd. Let's not initialize and build the legacy data unless CONFIG_OMAP_HWMOD is selected based on the SoCs enabled in .config. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to '')
-rw-r--r--arch/arm/mach-omap2/sr_device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index 17b66f0d0dee..b9a75892f7a7 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -152,6 +152,7 @@ exit:
return 0;
}
+#ifdef CONFIG_OMAP_HWMOD
static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
{
struct omap_smartreflex_dev_attr *sr_dev_attr;
@@ -165,6 +166,12 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
return sr_init_by_name(oh->name, sr_dev_attr->sensor_voltdm_name);
}
+#else
+static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
+{
+ return -EINVAL;
+}
+#endif
/*
* API to be called from board files to enable smartreflex