History

firmware_loader: Move definitions from sysfs_upload.h to sysfs.h

Move definitions required by sysfs.c from sysfs_upload.h to sysfs.h so that sysfs.c does not need to include sysfs_upload.h.

Russ Weight committed 4 years ago

Commit f8ae07f1 parent bc187f64 files · +20 −20Browse files

Unified · Split

4 files
  1. drivers/base/firmware_loader/sysfs.c +0 −1
  2. drivers/base/firmware_loader/sysfs.h +15 −0
  3. drivers/base/firmware_loader/sysfs_upload.c +0 −1
  4. drivers/base/firmware_loader/sysfs_upload.h +5 −18
drivers/base/firmware_loader/sysfs.c+0−1
@@ -7,7 +7,6 @@ · 6 unmodified lines
77 #include <linux/types.h>
88
99 #include "sysfs.h"
10−#include "sysfs_upload.h"
1110
1211 /*
1312 * sysfs support for firmware loader
drivers/base/firmware_loader/sysfs.h+15−0
@@ -99,4 +99,19 @@ struct fw_sysfs * · 98 unmodified lines
9999 fw_create_instance(struct firmware *firmware, const char *fw_name,
100100 struct device *device, u32 opt_flags);
101101
102+#ifdef CONFIG_FW_UPLOAD
103+extern struct device_attribute dev_attr_status;
104+extern struct device_attribute dev_attr_error;
105+extern struct device_attribute dev_attr_cancel;
106+extern struct device_attribute dev_attr_remaining_size;
107+
108+int fw_upload_start(struct fw_sysfs *fw_sysfs);
109+umode_t fw_upload_is_visible(struct kobject *kobj, struct attribute *attr, int n);
110+#else
111+static inline int fw_upload_start(struct fw_sysfs *fw_sysfs)
112+{
113+ return 0;
114+}
115+#endif
116+
102117 #endif /* __FIRMWARE_SYSFS_H */
drivers/base/firmware_loader/sysfs_upload.c+0−1
@@ -4,7 +4,6 @@ · 3 unmodified lines
44 #include <linux/module.h>
55 #include <linux/slab.h>
66
7−#include "sysfs.h"
87 #include "sysfs_upload.h"
98
109 /*
drivers/base/firmware_loader/sysfs_upload.h+5−18
@@ -1,9 +1,11 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
2−#ifndef __FIRMWARE_UPLOAD_H
3−#define __FIRMWARE_UPLOAD_H
2+#ifndef __SYSFS_UPLOAD_H
3+#define __SYSFS_UPLOAD_H
44
55 #include <linux/device.h>
66
7+#include "sysfs.h"
8+
79 /**
810 * enum fw_upload_prog - firmware upload progress codes
911 * @FW_UPLOAD_PROG_IDLE: there is no firmware upload in progress
@@ -36,19 +38,4 @@ struct fw_upload_priv { · 26 unmodified lines
3638 enum fw_upload_err err_code; /* security manager error code */
3739 };
3840
39−#ifdef CONFIG_FW_UPLOAD
40−extern struct device_attribute dev_attr_status;
41−extern struct device_attribute dev_attr_error;
42−extern struct device_attribute dev_attr_cancel;
43−extern struct device_attribute dev_attr_remaining_size;
44−
45−int fw_upload_start(struct fw_sysfs *fw_sysfs);
46−umode_t fw_upload_is_visible(struct kobject *kobj, struct attribute *attr, int n);
47−#else
48−static inline int fw_upload_start(struct fw_sysfs *fw_sysfs)
49−{
50− return 0;
51−}
52−#endif
53−
54−#endif /* __FIRMWARE_UPLOAD_H */
41+#endif /* __SYSFS_UPLOAD_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t