aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/firmware_loader/sysfs.c2
-rw-r--r--drivers/base/firmware_loader/sysfs.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/firmware_loader/sysfs.c b/drivers/base/firmware_loader/sysfs.c
index c09fcebeada9..eb7d9322a56e 100644
--- a/drivers/base/firmware_loader/sysfs.c
+++ b/drivers/base/firmware_loader/sysfs.c
@@ -110,7 +110,6 @@ static struct class firmware_class = {
.dev_release = fw_dev_release,
};
-#ifdef CONFIG_FW_LOADER_USER_HELPER
int register_sysfs_loader(void)
{
int ret = class_register(&firmware_class);
@@ -125,7 +124,6 @@ void unregister_sysfs_loader(void)
unregister_firmware_config_sysctl();
class_unregister(&firmware_class);
}
-#endif
static ssize_t firmware_loading_show(struct device *dev,
struct device_attribute *attr, char *buf)
diff --git a/drivers/base/firmware_loader/sysfs.h b/drivers/base/firmware_loader/sysfs.h
index c21bcfe374ff..e6c487937817 100644
--- a/drivers/base/firmware_loader/sysfs.h
+++ b/drivers/base/firmware_loader/sysfs.h
@@ -46,10 +46,12 @@ static inline void __fw_fallback_set_timeout(int timeout)
{
fw_fallback_config.loading_timeout = timeout;
}
+#endif
+#ifdef CONFIG_FW_LOADER_SYSFS
int register_sysfs_loader(void);
void unregister_sysfs_loader(void);
-#ifdef CONFIG_SYSCTL
+#if defined(CONFIG_FW_LOADER_USER_HELPER) && defined(CONFIG_SYSCTL)
int register_firmware_config_sysctl(void);
void unregister_firmware_config_sysctl(void);
#else
@@ -59,8 +61,8 @@ static inline int register_firmware_config_sysctl(void)
}
static inline void unregister_firmware_config_sysctl(void) { }
-#endif /* CONFIG_SYSCTL */
-#else /* CONFIG_FW_LOADER_USER_HELPER */
+#endif /* CONFIG_FW_LOADER_USER_HELPER && CONFIG_SYSCTL */
+#else /* CONFIG_FW_LOADER_SYSFS */
static inline int register_sysfs_loader(void)
{
return 0;
@@ -69,7 +71,7 @@ static inline int register_sysfs_loader(void)
static inline void unregister_sysfs_loader(void)
{
}
-#endif /* CONFIG_FW_LOADER_USER_HELPER */
+#endif /* CONFIG_FW_LOADER_SYSFS */
struct fw_sysfs {
bool nowait;