staging: r8188eu: set firmware path in a macro
authorGrzegorz Szymaszek <gszymaszek@short.pl>
Fri, 5 Aug 2022 16:27:41 +0000 (18:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Aug 2022 13:24:00 +0000 (15:24 +0200)
commitd987294a7e95160d1f322d23f07c8ed48aa8b05a
treeebb70dc99008e3852db312aee80f525ae62793e0
parent816ca75992ae1cd92a0b884037968b057ef3b682
staging: r8188eu: set firmware path in a macro

The r8188eu driver requires a firmware file, the path of which was
hardcoded as constant strings in two places:
(1) in core/rtw_fw.c, in function load_firmware(),
(2) in os_dep/os_intfs.c, in the MODULE_FIRMWARE() call.

Declare the path using a macro, FW_RTL8188EU, and replace the above
constant strings with the macro. That's the way it is done in many other
drivers. The new macro is defined in include/drv_types.h, because that
file is already included by both of the above files (or at least their
headers) and because it already contains other driver constants, like
its name and version.

Link: https://lore.kernel.org/lkml/YuoQ37PIKzWO1zIY@kroah.com/
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Link: https://lore.kernel.org/r/60dc57fc73e8e6e8e3aaae68784f4be932547bf5.1659715931.git.gszymaszek@short.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_fw.c
drivers/staging/r8188eu/include/drv_types.h
drivers/staging/r8188eu/os_dep/os_intfs.c