From: Mukesh Ojha <quic_mojha@quicinc.com>
To: <mcgrof@kernel.org>, <russ.weight@linux.dev>,
<gregkh@linuxfoundation.org>, <rafael@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, Mukesh Ojha <quic_mojha@quicinc.com>
Subject: [PATCH vRFC 3/8] treewide: rename firmware_request_platform()
Date: Thu, 22 Feb 2024 23:30:28 +0530 [thread overview]
Message-ID: <20240222180033.23775-4-quic_mojha@quicinc.com> (raw)
In-Reply-To: <20240222180033.23775-1-quic_mojha@quicinc.com>
Rename firmware_request_platform() to request_firmware_platform()
to be more concrete and align with the name of other request
firmware family functions.
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
---
Documentation/driver-api/firmware/fallback-mechanisms.rst | 4 ++--
Documentation/driver-api/firmware/lookup-order.rst | 2 +-
Documentation/driver-api/firmware/request_firmware.rst | 4 ++--
drivers/base/firmware_loader/main.c | 6 +++---
drivers/input/touchscreen/chipone_icn8505.c | 2 +-
drivers/input/touchscreen/silead.c | 2 +-
include/linux/firmware.h | 4 ++--
lib/test_firmware.c | 2 +-
8 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Documentation/driver-api/firmware/fallback-mechanisms.rst b/Documentation/driver-api/firmware/fallback-mechanisms.rst
index 5f04c3bcdf0c..f888fceb65ba 100644
--- a/Documentation/driver-api/firmware/fallback-mechanisms.rst
+++ b/Documentation/driver-api/firmware/fallback-mechanisms.rst
@@ -212,7 +212,7 @@ of firmware for some of the system's integrated peripheral devices and
the peripheral's Linux device-driver needs to access this firmware.
Device drivers which need such firmware can use the
-firmware_request_platform() function for this, note that this is a
+request_firmware_platform() function for this, note that this is a
separate fallback mechanism from the other fallback mechanisms and
this does not use the sysfs interface.
@@ -245,7 +245,7 @@ To register this array with the efi-embedded-fw code, a driver needs to:
4. Add "select EFI_EMBEDDED_FIRMWARE if EFI_STUB" to its Kconfig entry.
-The firmware_request_platform() function will always first try to load firmware
+The request_firmware_platform() function will always first try to load firmware
with the specified name directly from the disk, so the EFI embedded-fw can
always be overridden by placing a file under /lib/firmware.
diff --git a/Documentation/driver-api/firmware/lookup-order.rst b/Documentation/driver-api/firmware/lookup-order.rst
index 6064672a782e..c72bc8efb734 100644
--- a/Documentation/driver-api/firmware/lookup-order.rst
+++ b/Documentation/driver-api/firmware/lookup-order.rst
@@ -13,7 +13,7 @@ a driver issues a firmware API call.
* The ''Direct filesystem lookup'' is performed next, if found we
return it immediately
* The ''Platform firmware fallback'' is performed next, but only when
- firmware_request_platform() is used, if found we return it immediately
+ request_firmware_platform() is used, if found we return it immediately
* If no firmware has been found and the fallback mechanism was enabled
the sysfs interface is created. After this either a kobject uevent
is issued or the custom firmware loading is relied upon for firmware
diff --git a/Documentation/driver-api/firmware/request_firmware.rst b/Documentation/driver-api/firmware/request_firmware.rst
index 0201334bc308..3d6df9922c4b 100644
--- a/Documentation/driver-api/firmware/request_firmware.rst
+++ b/Documentation/driver-api/firmware/request_firmware.rst
@@ -25,10 +25,10 @@ request_firmware_nowarn
.. kernel-doc:: drivers/base/firmware_loader/main.c
:functions: request_firmware_nowarn
-firmware_request_platform
+request_firmware_platform
-------------------------
.. kernel-doc:: drivers/base/firmware_loader/main.c
- :functions: firmware_request_platform
+ :functions: request_firmware_platform
request_firmware_direct
-----------------------
diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
index cb681f4069b8..9411ad7968cb 100644
--- a/drivers/base/firmware_loader/main.c
+++ b/drivers/base/firmware_loader/main.c
@@ -1016,7 +1016,7 @@ int request_firmware_direct(const struct firmware **firmware_p,
EXPORT_SYMBOL_GPL(request_firmware_direct);
/**
- * firmware_request_platform() - request firmware with platform-fw fallback
+ * request_firmware_platform() - request firmware with platform-fw fallback
* @firmware: pointer to firmware image
* @name: name of firmware file
* @device: device for which firmware is being loaded
@@ -1025,13 +1025,13 @@ EXPORT_SYMBOL_GPL(request_firmware_direct);
* direct filesystem lookup fails, it will fallback to looking for a copy of the
* requested firmware embedded in the platform's main (e.g. UEFI) firmware.
**/
-int firmware_request_platform(const struct firmware **firmware,
+int request_firmware_platform(const struct firmware **firmware,
const char *name, struct device *device)
{
return _request_firmware(firmware, name, device, NULL, 0, 0,
FW_OPT_UEVENT | FW_OPT_FALLBACK_PLATFORM);
}
-EXPORT_SYMBOL_GPL(firmware_request_platform);
+EXPORT_SYMBOL_GPL(request_firmware_platform);
/**
* firmware_request_cache() - cache firmware for suspend so resume can use it
diff --git a/drivers/input/touchscreen/chipone_icn8505.c b/drivers/input/touchscreen/chipone_icn8505.c
index b56954830b33..be1d7530a968 100644
--- a/drivers/input/touchscreen/chipone_icn8505.c
+++ b/drivers/input/touchscreen/chipone_icn8505.c
@@ -288,7 +288,7 @@ static int icn8505_upload_fw(struct icn8505_data *icn8505)
* we may need it at resume. Having loaded it once will make the
* firmware class code cache it at suspend/resume.
*/
- error = firmware_request_platform(&fw, icn8505->firmware_name, dev);
+ error = request_firmware_platform(&fw, icn8505->firmware_name, dev);
if (error) {
dev_err(dev, "Firmware request error %d\n", error);
return error;
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
index 52477e450b02..e3fb27eeca40 100644
--- a/drivers/input/touchscreen/silead.c
+++ b/drivers/input/touchscreen/silead.c
@@ -428,7 +428,7 @@ static int silead_ts_load_fw(struct i2c_client *client)
*/
error = request_firmware_nowarn(&fw, data->fw_name, dev);
if (error) {
- error = firmware_request_platform(&fw, data->fw_name, dev);
+ error = request_firmware_platform(&fw, data->fw_name, dev);
if (error) {
dev_err(dev, "Firmware request error %d\n", error);
return error;
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 5523c9fdc92d..93e6a37352a8 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -99,7 +99,7 @@ int request_firmware(const struct firmware **fw, const char *name,
struct device *device);
int request_firmware_nowarn(const struct firmware **fw, const char *name,
struct device *device);
-int firmware_request_platform(const struct firmware **fw, const char *name,
+int request_firmware_platform(const struct firmware **fw, const char *name,
struct device *device);
int request_firmware_nowait(
struct module *module, bool uevent,
@@ -129,7 +129,7 @@ static inline int request_firmware_nowarn(const struct firmware **fw,
return -EINVAL;
}
-static inline int firmware_request_platform(const struct firmware **fw,
+static inline int request_firmware_platform(const struct firmware **fw,
const char *name,
struct device *device)
{
diff --git a/lib/test_firmware.c b/lib/test_firmware.c
index 9cfdcd6d21db..4aeb25bea3b4 100644
--- a/lib/test_firmware.c
+++ b/lib/test_firmware.c
@@ -730,7 +730,7 @@ static ssize_t trigger_request_platform_store(struct device *dev,
efi_embedded_fw_checked = true;
pr_info("loading '%s'\n", name);
- rc = firmware_request_platform(&firmware, name, dev);
+ rc = request_firmware_platform(&firmware, name, dev);
if (rc) {
pr_info("load of '%s' failed: %d\n", name, rc);
goto out;
--
2.43.0.254.ga26002b62827
next prev parent reply other threads:[~2024-02-22 18:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 18:00 [PATCH vRFC 0/8] Refactor and rename request firmware API Mukesh Ojha
2024-02-22 18:00 ` [PATCH vRFC 1/8] firmware_loader: Refactor request firmware lower level functions Mukesh Ojha
2024-02-22 18:00 ` [PATCH vRFC 2/8] treewide: rename firmware_request_nowarn() Mukesh Ojha
2024-02-22 18:00 ` Mukesh Ojha [this message]
2024-02-23 6:21 ` [PATCH vRFC 3/8] treewide: rename firmware_request_platform() Greg KH
2024-02-23 15:15 ` Luis Chamberlain
2024-02-23 15:33 ` Greg KH
2024-02-23 19:42 ` Luis Chamberlain
2024-02-24 5:36 ` Greg KH
2024-02-26 10:52 ` Mukesh Ojha
2024-02-26 13:09 ` Greg KH
2024-02-26 13:22 ` Mukesh Ojha
2024-02-26 16:06 ` Luis Chamberlain
2024-02-22 18:00 ` [PATCH vRFC 4/8] treewide: rename firmware_request_cache() Mukesh Ojha
2024-02-22 18:00 ` [PATCH vRFC 5/8] firmware: Convert minor inline function to macro Mukesh Ojha
2024-02-23 6:22 ` Greg KH
2024-02-22 18:00 ` [PATCH vRFC 6/8] firmware: Move module template to the bottom Mukesh Ojha
2024-02-22 18:00 ` [PATCH vRFC 7/8] firmware: remove prototype of fw_cache_piggyback_on_request() Mukesh Ojha
2024-02-22 18:00 ` [PATCH vRFC 8/8] firmware: FW_OPT_UEVENT for all request_firmware family functions Mukesh Ojha
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=20240222180033.23775-4-quic_mojha@quicinc.com \
--to=quic_mojha@quicinc.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=russ.weight@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).