Skip to contentSkip to conversation

I2C: unnecessary #includes in asb100.c

PATCH New Mark M. Hoffman 2 participants 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 I2C: unnecessary #includes in asb100.c

Hi Jean, Greg:

Quoted 5 lines · Jean Delvare

Any reson why asb100.c (in linux 2.6.11-rc2) includes linux/ioport.h and asm/io.h? As an i2c-only chip driver, I don't think it needs these.

As a side note, I also wonder what the inclusions of linux/config.h, linux/types.h and asm/errno.h are there for.

Because they look pretty? Here's a patch Greg, please apply...

Index: linux-2.6.11-rc2-bk8/drivers/i2c/chips/asb100.c
=================================--- linux-2.6.11-rc2-bk8.orig/drivers/i2c/chips/asb100.c 2005-01-30 18:20:41.000000000 -0500
+++ linux-2.6.11-rc2-bk8/drivers/i2c/chips/asb100.c 2005-01-30 23:50:53.000000000 -0500
@@ -36,17 +36,12 @@

     asb100	7	3	1	4	0x31	0x0694	yes	no

*/

-#include <linux/config.h>
#include <linux/module.h>
#include <linux/slab.h>
-#include <linux/ioport.h>
-#include <linux/types.h>
#include <linux/i2c.h>
#include <linux/i2c-sensor.h>
#include <linux/i2c-vid.h>
#include <linux/init.h>
-#include <asm/errno.h>
-#include <asm/io.h>
#include "lm75.h"

/*

Signature · 2 lines
Mark M. Hoffman
[email protected]
Applied
#1 lore raw

PATCH 1/1 I2C: unnecessary #includes in asb100.c

Quoted 10 lines · Mark M. Hoffman

Hi Jean, Greg:

Quoted 5 lines · Jean Delvare

Any reson why asb100.c (in linux 2.6.11-rc2) includes linux/ioport.h and asm/io.h? As an i2c-only chip driver, I don't think it needs these.

As a side note, I also wonder what the inclusions of linux/config.h, linux/types.h and asm/errno.h are there for.

Because they look pretty? Here's a patch Greg, please apply...

Applied, thanks.

greg k-h