diff mbox

[2/7] at91/i2c: move register header to drivers

Message ID 1310687525-22486-2-git-send-email-plagnioj@jcrosoft.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jean-Christophe PLAGNIOL-VILLARD July 14, 2011, 11:52 p.m. UTC
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: linux-i2c@vger.kernel.org
---
 drivers/i2c/busses/i2c-at91.c                      |    3 ++-
 .../at91_twi.h => drivers/i2c/busses/i2c-at91.h    |    7 +++----
 2 files changed, 5 insertions(+), 5 deletions(-)
 rename arch/arm/mach-at91/include/mach/at91_twi.h => drivers/i2c/busses/i2c-at91.h (97%)

Comments

Jean Delvare July 15, 2011, 7:23 a.m. UTC | #1
Hi Jean-Christophe,

On Fri, 15 Jul 2011 01:52:00 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: linux-i2c@vger.kernel.org
> ---
>  drivers/i2c/busses/i2c-at91.c                      |    3 ++-
>  .../at91_twi.h => drivers/i2c/busses/i2c-at91.h    |    7 +++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
>  rename arch/arm/mach-at91/include/mach/at91_twi.h => drivers/i2c/busses/i2c-at91.h (97%)

Why don't you just merge i2c-at91.h into i2c-at91.c then, if it's the
only user?
Jean-Christophe PLAGNIOL-VILLARD July 15, 2011, 3:49 p.m. UTC | #2
On 09:23 Fri 15 Jul     , Jean Delvare wrote:
> Hi Jean-Christophe,
> 
> On Fri, 15 Jul 2011 01:52:00 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> > Cc: linux-i2c@vger.kernel.org
> > ---
> >  drivers/i2c/busses/i2c-at91.c                      |    3 ++-
> >  .../at91_twi.h => drivers/i2c/busses/i2c-at91.h    |    7 +++----
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> >  rename arch/arm/mach-at91/include/mach/at91_twi.h => drivers/i2c/busses/i2c-at91.h (97%)
> 
> Why don't you just merge i2c-at91.h into i2c-at91.c then, if it's the
> only user?
I prefer to keep the define in a seperate file

Best Regards,
J.
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 305c075..7402fed 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -25,10 +25,11 @@ 
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
-#include <mach/at91_twi.h>
 #include <mach/board.h>
 #include <mach/cpu.h>
 
+#include "i2c_at91.h"
+
 #define TWI_CLOCK		100000		/* Hz. max 400 Kbits/sec */
 
 
diff --git a/arch/arm/mach-at91/include/mach/at91_twi.h b/drivers/i2c/busses/i2c-at91.h
similarity index 97%
rename from arch/arm/mach-at91/include/mach/at91_twi.h
rename to drivers/i2c/busses/i2c-at91.h
index bb2880f..0f33ec7 100644
--- a/arch/arm/mach-at91/include/mach/at91_twi.h
+++ b/drivers/i2c/busses/i2c-at91.h
@@ -1,5 +1,5 @@ 
 /*
- * arch/arm/mach-at91/include/mach/at91_twi.h
+ * drivers/i2c/busses/i2c-at91.h
  *
  * Copyright (C) 2005 Ivan Kokshaysky
  * Copyright (C) SAN People
@@ -13,8 +13,8 @@ 
  * (at your option) any later version.
  */
 
-#ifndef AT91_TWI_H
-#define AT91_TWI_H
+#ifndef I2C_AT91_H
+#define I2C_AT91_H
 
 #define	AT91_TWI_CR		0x00		/* Control Register */
 #define		AT91_TWI_START		(1 <<  0)	/* Send a Start Condition */
@@ -65,4 +65,3 @@ 
 #define	AT91_TWI_THR		0x34		/* Transmit Holding Register */
 
 #endif
-