Skip to contentSkip to conversation

i2c-i801: Include <linux/slab.h>

PATCH Applied Ben Hutchings 2 participants 2 messages Dec 11, 2010 – Dec 12, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-i801: Include <linux/slab.h>

Commit 5a0e3ad6af8660be21ca98a971cd00f331318c05 added direct inclusion of <linux/slab.h> to those source files that appeared to need it, but somehow missed this. On most architectures <linux/slab.h> is still indirectly included, but there are exceptions such as alpha.

---
 drivers/i2c/busses/i2c-i801.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/i2c/busses/i2c-i801.c +1 -0
index 02835ce..7979aef 100644
@@ -72,6 +72,7 @@
 #include <linux/acpi.h>
 #include <linux/io.h>
 #include <linux/dmi.h>
+#include <linux/slab.h>
 
 /* I801 SMBus address offsets */
 #define SMBHSTSTS(p)	(0 + (p)->smba)
Signature · 1 line
1.7.2.3
Applied
#1 lore raw

Hi Ben,

Quoted 3 lines · Ben Hutchings

Commit 5a0e3ad6af8660be21ca98a971cd00f331318c05 added direct inclusion of <linux/slab.h> to those source files that appeared to need it, but somehow missed this.

Most probably because the i2c-i801 driver didn't do any memory allocation until this recent change:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0cd96eb0a74791cacb27ace902b991cfd0e72abe

Quoted 13 lines

On most architectures <linux/slab.h> is still indirectly included, but there are exceptions such as alpha.

---
 drivers/i2c/busses/i2c-i801.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/i2c/busses/i2c-i801.c +0 -0
index 02835ce..7979aef 100644

drivers/i2c/busses/i2c-i801.c line 78

Quoted 7 lines
drivers/i2c/busses/i2c-i801.c +1 -0
@@ -72,6 +72,7 @@
 #include <linux/acpi.h>
 #include <linux/io.h>
 #include <linux/dmi.h>
+#include <linux/slab.h>
 
 /* I801 SMBus address offsets */
 #define SMBHSTSTS(p)	(0 + (p)->smba)

Applied, thanks.

Signature · 1 line
Jean Delvare