Documentation/firmware/... convert #include "linux/..." to #include <linux/...>
Subsystems (3)
PATCH 4/5 Documentation/firmware/... convert #include "linux/..." to #include <linux/...>
(untested)
There are several files that
#include "linux/file" not #include <linux/file>
#include "asm/file" not #include <asm/file>
Here's a little script that converts them:
egrep -i -r -l --include=*.[ch] \
"^[[:space:]]*\#[[:space:]]*include[[:space:]]*\"(linux|asm)/(.*)\"" * \
| xargs sed -i -e 's/^[[:space:]]*#[[:space:]]*include[[:space:]]*"\(linux\|asm\)\/\(.*\)"/#include <\1\/\2>/g'
This one is probably wrong.
It should likely keep firmware.h in
the same directory as firmware.c
Documentation/firmware_class/firmware_sample_driver.c +1 -1
@@ -13,7 +13,7 @@#include <linux/device.h> #include <linux/string.h> -#include "linux/firmware.h" +#include "firmware.h" static struct device ghost_device = { .bus_id ="ghost0" ,
Quoted 24 lines · On Sun, 19 Aug 2007 15:19:32 -0700 Joe Perches wrote:
(untested)
There are several files that
#include "linux/file" not #include <linux/file>
#include "asm/file" not #include <asm/file>Here's a little script that converts them:
egrep -i -r -l --include=*.[ch] \
"^[[:space:]]*\#[[:space:]]*include[[:space:]]*\"(linux|asm)/(.*)\"" * \
| xargs sed -i -e 's/^[[:space:]]*#[[:space:]]*include[[:space:]]*"\(linux\|asm\)\/\(.*\)"/#include <\1\/\2>/g'This one is probably wrong.
It should likely keep
firmware.hin
the same directory asfirmware.cSigned-off-by Joe Perches <[email protected]>Documentation/firmware_class/firmware_sample_driver.c +0
-0
Documentation/firmware_class/firmware_sample_driver.c line 16
Quoted 5 lines
Documentation/firmware_class/firmware_sample_driver.c +1
-1@@ -13,7 +13,7 @@#include <linux/device.h> #include <linux/string.h> -#include "linux/firmware.h" +#include "firmware.h"
I believe that it should be <linux/firmware.h>.
Documentation/firmware_class/firmware_sample_driver.c line 19
Quoted 2 lines
Documentation/firmware_class/firmware_sample_driver.c +0
-0static struct device ghost_device = { .bus_id ="ghost0" ,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 3 lines · Randy Dunlap
Documentation/firmware_class/firmware_sample_driver.c line 16
Quoted 2 lines
Documentation/firmware_class/firmware_sample_driver.c +1
-1-#include "linux/firmware.h" +#include "firmware.h" I believe that it should be <
linux/firmware.h>.
OK.
That's not my taste though, especially if only included by files in the firmware_class directory. Less pollution/namespace collision in include/linux
cheers, Joe
Quoted 10 lines · On Sun, 19 Aug 2007 15:31:57 -0700 Joe Perches wrote:
Quoted 3 lines · Randy Dunlap
Documentation/firmware_class/firmware_sample_driver.c line 16
Quoted 2 lines
Documentation/firmware_class/firmware_sample_driver.c +1
-1-#include "linux/firmware.h" +#include "firmware.h" I believe that it should be <
linux/firmware.h>.OK.
That's not my taste though, especially if only included by files in the
firmware_classdirectory. Less pollution/namespace collision ininclude/linux
It's not only included in that directory.
I find it included in 88 source files throughout the kernel tree.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 2 lines · Randy Dunlap
It's not only included in that directory.
I find it included in 88 source files throughout the kernel tree.
I see, sorry. I didn't read the file.
I thought it was a sample driver with a binary blob.
cheers, Joe
Documentation/firmware_class/firmware_sample_driver.c +1 -1
@@ -13,7 +13,7 @@#include <linux/device.h> #include <linux/string.h> -#include "linux/firmware.h" +#include <linux/firmware.h> static struct device ghost_device = { .bus_id ="ghost0" ,