diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/firmware_class/README | 17 | ||||
-rw-r--r-- | Documentation/firmware_class/firmware_sample_driver.c | 11 |
2 files changed, 0 insertions, 28 deletions
diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README index 43e836c07ae8..e9cc8bb26f7d 100644 --- a/Documentation/firmware_class/README +++ b/Documentation/firmware_class/README | |||
@@ -105,20 +105,3 @@ | |||
105 | on the setup, so I think that the choice on what firmware to make | 105 | on the setup, so I think that the choice on what firmware to make |
106 | persistent should be left to userspace. | 106 | persistent should be left to userspace. |
107 | 107 | ||
108 | - Why register_firmware()+__init can be useful: | ||
109 | - For boot devices needing firmware. | ||
110 | - To make the transition easier: | ||
111 | The firmware can be declared __init and register_firmware() | ||
112 | called on module_init. Then the firmware is warranted to be | ||
113 | there even if "firmware hotplug userspace" is not there yet or | ||
114 | it doesn't yet provide the needed firmware. | ||
115 | Once the firmware is widely available in userspace, it can be | ||
116 | removed from the kernel. Or made optional (CONFIG_.*_FIRMWARE). | ||
117 | |||
118 | In either case, if firmware hotplug support is there, it can move the | ||
119 | firmware out of kernel memory into the real filesystem for later | ||
120 | usage. | ||
121 | |||
122 | Note: If persistence is implemented on top of initramfs, | ||
123 | register_firmware() may not be appropriate. | ||
124 | |||
diff --git a/Documentation/firmware_class/firmware_sample_driver.c b/Documentation/firmware_class/firmware_sample_driver.c index ad3edaba4533..87feccdb5c9f 100644 --- a/Documentation/firmware_class/firmware_sample_driver.c +++ b/Documentation/firmware_class/firmware_sample_driver.c | |||
@@ -5,8 +5,6 @@ | |||
5 | * | 5 | * |
6 | * Sample code on how to use request_firmware() from drivers. | 6 | * Sample code on how to use request_firmware() from drivers. |
7 | * | 7 | * |
8 | * Note that register_firmware() is currently useless. | ||
9 | * | ||
10 | */ | 8 | */ |
11 | 9 | ||
12 | #include <linux/module.h> | 10 | #include <linux/module.h> |
@@ -17,11 +15,6 @@ | |||
17 | 15 | ||
18 | #include "linux/firmware.h" | 16 | #include "linux/firmware.h" |
19 | 17 | ||
20 | #define WE_CAN_NEED_FIRMWARE_BEFORE_USERSPACE_IS_AVAILABLE | ||
21 | #ifdef WE_CAN_NEED_FIRMWARE_BEFORE_USERSPACE_IS_AVAILABLE | ||
22 | char __init inkernel_firmware[] = "let's say that this is firmware\n"; | ||
23 | #endif | ||
24 | |||
25 | static struct device ghost_device = { | 18 | static struct device ghost_device = { |
26 | .bus_id = "ghost0", | 19 | .bus_id = "ghost0", |
27 | }; | 20 | }; |
@@ -104,10 +97,6 @@ static void sample_probe_async(void) | |||
104 | 97 | ||
105 | static int sample_init(void) | 98 | static int sample_init(void) |
106 | { | 99 | { |
107 | #ifdef WE_CAN_NEED_FIRMWARE_BEFORE_USERSPACE_IS_AVAILABLE | ||
108 | register_firmware("sample_driver_fw", inkernel_firmware, | ||
109 | sizeof(inkernel_firmware)); | ||
110 | #endif | ||
111 | device_initialize(&ghost_device); | 100 | device_initialize(&ghost_device); |
112 | /* since there is no real hardware insertion I just call the | 101 | /* since there is no real hardware insertion I just call the |
113 | * sample probe functions here */ | 102 | * sample probe functions here */ |