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
7#include <linux/types.h>7#include <linux/types.h>
8 8
9#include "sysfs.h"9#include "sysfs.h"
10#include "sysfs_upload.h"
11 10
12/*11/*
13 * sysfs support for firmware loader12 * sysfs support for firmware loader
drivers/base/firmware_loader/sysfs.h+15−0
@@ -99,4 +99,19 @@ struct fw_sysfs * · 98 unmodified lines
99fw_create_instance(struct firmware *firmware, const char *fw_name,99fw_create_instance(struct firmware *firmware, const char *fw_name,
100 struct device *device, u32 opt_flags);100 struct device *device, u32 opt_flags);
101 101
102#ifdef CONFIG_FW_UPLOAD
103extern struct device_attribute dev_attr_status;
104extern struct device_attribute dev_attr_error;
105extern struct device_attribute dev_attr_cancel;
106extern struct device_attribute dev_attr_remaining_size;
107
108int fw_upload_start(struct fw_sysfs *fw_sysfs);
109umode_t fw_upload_is_visible(struct kobject *kobj, struct attribute *attr, int n);
110#else
111static inline int fw_upload_start(struct fw_sysfs *fw_sysfs)
112{
113 return 0;
114}
115#endif
116
102#endif /* __FIRMWARE_SYSFS_H */117#endif /* __FIRMWARE_SYSFS_H */
drivers/base/firmware_loader/sysfs_upload.c+0−1
@@ -4,7 +4,6 @@ · 3 unmodified lines
4#include <linux/module.h>4#include <linux/module.h>
5#include <linux/slab.h>5#include <linux/slab.h>
6 6
7#include "sysfs.h"
8#include "sysfs_upload.h"7#include "sysfs_upload.h"
9 8
10/*9/*
drivers/base/firmware_loader/sysfs_upload.h+5−18
@@ -1,9 +1,11 @@
1/* SPDX-License-Identifier: GPL-2.0 */1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __FIRMWARE_UPLOAD_H2#ifndef __SYSFS_UPLOAD_H
3#define __FIRMWARE_UPLOAD_H3#define __SYSFS_UPLOAD_H
4 4
5#include <linux/device.h>5#include <linux/device.h>
6 6
7#include "sysfs.h"
8
7/**9/**
8 * enum fw_upload_prog - firmware upload progress codes10 * enum fw_upload_prog - firmware upload progress codes
9 * @FW_UPLOAD_PROG_IDLE: there is no firmware upload in progress11 * @FW_UPLOAD_PROG_IDLE: there is no firmware upload in progress
@@ -36,19 +38,4 @@ struct fw_upload_priv { · 26 unmodified lines
36 enum fw_upload_err err_code; /* security manager error code */38 enum fw_upload_err err_code; /* security manager error code */
37};39};
38 40
39#ifdef CONFIG_FW_UPLOAD41#endif /* __SYSFS_UPLOAD_H */
40extern struct device_attribute dev_attr_status;
41extern struct device_attribute dev_attr_error;
42extern struct device_attribute dev_attr_cancel;
43extern struct device_attribute dev_attr_remaining_size;
44
45int fw_upload_start(struct fw_sysfs *fw_sysfs);
46umode_t fw_upload_is_visible(struct kobject *kobj, struct attribute *attr, int n);
47#else
48static inline int fw_upload_start(struct fw_sysfs *fw_sysfs)
49{
50 return 0;
51}
52#endif
53
54#endif /* __FIRMWARE_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