r8169: improve firmware handling
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 22 Jan 2019 21:23:41 +0000 (22:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jan 2019 19:21:59 +0000 (11:21 -0800)
commit254764e55652d47fe81a54d7c226f3ba230180fe
tree425430280d29ebc3adb56559d5e53f0a47d525ae
parenta56d7b95bec88603a19d4c337d5ae8c439b3ca21
r8169: improve firmware handling

So far member rtl_fw has three states:
- IS_ERR(rtl_fw): firmware not loaded
- !rtl_fw: no firmware available
- other: firmware loaded

This can be made simpler and clearer by adding the firmware name as
member fw_name to struct rtl8169_private. Then:

- !fw_name: no firmware available
- !rtl_fw: firmware not loaded
- rtl_fw: firmware loaded

This change also allows to easily merge rtl_request_uncached_firmware
into rtl_request_firmware.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c