From: Russ Weight <russell.h.weight@intel.com>
To: mcgrof@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org,
linux-kernel@vger.kernel.org
Cc: trix@redhat.com, marpagan@redhat.com, lgoncalv@redhat.com,
yilun.xu@intel.com, hao.wu@intel.com,
matthew.gerlach@linux.intel.com,
basheer.ahmed.muddebihal@intel.com, tianfei.zhang@intel.com,
Russ Weight <russell.h.weight@intel.com>
Subject: [PATCH v1 2/2] firmware_loader: Move definitions from sysfs_upload.h to sysfs.h
Date: Tue, 26 Apr 2022 13:03:56 -0700 [thread overview]
Message-ID: <20220426200356.126085-3-russell.h.weight@intel.com> (raw)
In-Reply-To: <20220426200356.126085-1-russell.h.weight@intel.com>
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.
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
---
drivers/base/firmware_loader/sysfs.c | 1 -
drivers/base/firmware_loader/sysfs.h | 15 ++++++++++++++
drivers/base/firmware_loader/sysfs_upload.c | 1 -
drivers/base/firmware_loader/sysfs_upload.h | 23 +++++----------------
4 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/base/firmware_loader/sysfs.c b/drivers/base/firmware_loader/sysfs.c
index eb7d9322a56e..5b0b85b70b6f 100644
--- a/drivers/base/firmware_loader/sysfs.c
+++ b/drivers/base/firmware_loader/sysfs.c
@@ -7,7 +7,6 @@
#include <linux/types.h>
#include "sysfs.h"
-#include "sysfs_upload.h"
/*
* sysfs support for firmware loader
diff --git a/drivers/base/firmware_loader/sysfs.h b/drivers/base/firmware_loader/sysfs.h
index e6c487937817..5d8ff1675c79 100644
--- a/drivers/base/firmware_loader/sysfs.h
+++ b/drivers/base/firmware_loader/sysfs.h
@@ -99,4 +99,19 @@ struct fw_sysfs *
fw_create_instance(struct firmware *firmware, const char *fw_name,
struct device *device, u32 opt_flags);
+#ifdef CONFIG_FW_UPLOAD
+extern struct device_attribute dev_attr_status;
+extern struct device_attribute dev_attr_error;
+extern struct device_attribute dev_attr_cancel;
+extern struct device_attribute dev_attr_remaining_size;
+
+int fw_upload_start(struct fw_sysfs *fw_sysfs);
+umode_t fw_upload_is_visible(struct kobject *kobj, struct attribute *attr, int n);
+#else
+static inline int fw_upload_start(struct fw_sysfs *fw_sysfs)
+{
+ return 0;
+}
+#endif
+
#endif /* __FIRMWARE_SYSFS_H */
diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c
index c504dae00dbe..8cdcf3516c7e 100644
--- a/drivers/base/firmware_loader/sysfs_upload.c
+++ b/drivers/base/firmware_loader/sysfs_upload.c
@@ -4,7 +4,6 @@
#include <linux/module.h>
#include <linux/slab.h>
-#include "sysfs.h"
#include "sysfs_upload.h"
/*
diff --git a/drivers/base/firmware_loader/sysfs_upload.h b/drivers/base/firmware_loader/sysfs_upload.h
index 9edd47d3f36a..31931ff7808a 100644
--- a/drivers/base/firmware_loader/sysfs_upload.h
+++ b/drivers/base/firmware_loader/sysfs_upload.h
@@ -1,9 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __FIRMWARE_UPLOAD_H
-#define __FIRMWARE_UPLOAD_H
+#ifndef __SYSFS_UPLOAD_H
+#define __SYSFS_UPLOAD_H
#include <linux/device.h>
+#include "sysfs.h"
+
/**
* enum fw_upload_prog - firmware upload progress codes
* @FW_UPLOAD_PROG_IDLE: there is no firmware upload in progress
@@ -36,19 +38,4 @@ struct fw_upload_priv {
enum fw_upload_err err_code; /* security manager error code */
};
-#ifdef CONFIG_FW_UPLOAD
-extern struct device_attribute dev_attr_status;
-extern struct device_attribute dev_attr_error;
-extern struct device_attribute dev_attr_cancel;
-extern struct device_attribute dev_attr_remaining_size;
-
-int fw_upload_start(struct fw_sysfs *fw_sysfs);
-umode_t fw_upload_is_visible(struct kobject *kobj, struct attribute *attr, int n);
-#else
-static inline int fw_upload_start(struct fw_sysfs *fw_sysfs)
-{
- return 0;
-}
-#endif
-
-#endif /* __FIRMWARE_UPLOAD_H */
+#endif /* __SYSFS_UPLOAD_H */
--
2.25.1
prev parent reply other threads:[~2022-04-26 20:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 20:03 [PATCH v1 0/2] Fix-up patches for Firmware Uploads Russ Weight
2022-04-26 20:03 ` [PATCH v1 1/2] firmware_loader: Fix configs for sysfs split Russ Weight
2022-04-26 20:03 ` Russ Weight [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220426200356.126085-3-russell.h.weight@intel.com \
--to=russell.h.weight@intel.com \
--cc=basheer.ahmed.muddebihal@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hao.wu@intel.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marpagan@redhat.com \
--cc=matthew.gerlach@linux.intel.com \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=tianfei.zhang@intel.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®