@@ -129,7 +129,7 @@ static int cbus_transfer(struct cbus_host *host, unsigned rw, unsigned dev,
/*
* Read a given register from the device
*/
-int cbus_read_reg(int dev, int reg)
+int cbus_read_reg(unsigned dev, unsigned reg)
{
return cbus_transfer(cbus_host, CBUS_XFER_READ, dev, reg, 0);
}
@@ -138,7 +138,7 @@ EXPORT_SYMBOL(cbus_read_reg);
/*
* Write to a given register of the device
*/
-int cbus_write_reg(int dev, int reg, int val)
+int cbus_write_reg(unsigned dev, unsigned reg, unsigned val)
{
return cbus_transfer(cbus_host, CBUS_XFER_WRITE, dev, reg, val);
}
@@ -32,7 +32,7 @@ struct cbus_host {
int sel_gpio;
};
-extern int cbus_read_reg(int dev, int reg);
-extern int cbus_write_reg(int dev, int reg, int val);
+extern int cbus_read_reg(unsigned dev, unsigned reg);
+extern int cbus_write_reg(unsigned dev, unsigned reg, unsigned val);
#endif /* __DRIVERS_CBUS_CBUS_H */
@@ -78,7 +78,7 @@ EXPORT_SYMBOL(retu_get_status);
*
* This function returns the contents of the specified register
*/
-int retu_read_reg(int reg)
+int retu_read_reg(unsigned reg)
{
BUG_ON(!retu_initialized);
return cbus_read_reg(RETU_ID, reg);
@@ -91,13 +91,13 @@ int retu_read_reg(int reg)
*
* This function writes a value to the specified register
*/
-void retu_write_reg(int reg, u16 val)
+void retu_write_reg(unsigned reg, u16 val)
{
BUG_ON(!retu_initialized);
cbus_write_reg(RETU_ID, reg, val);
}
-void retu_set_clear_reg_bits(int reg, u16 set, u16 clear)
+void retu_set_clear_reg_bits(unsigned reg, u16 set, u16 clear)
{
unsigned long flags;
u16 w;
@@ -58,9 +58,9 @@
#define MAX_RETU_IRQ_HANDLERS 16
int retu_get_status(void);
-int retu_read_reg(int reg);
-void retu_write_reg(int reg, u16 val);
-void retu_set_clear_reg_bits(int reg, u16 set, u16 clear);
+int retu_read_reg(unsigned reg);
+void retu_write_reg(unsigned reg, u16 val);
+void retu_set_clear_reg_bits(unsigned reg, u16 set, u16 clear);
int retu_read_adc(int channel);
int retu_request_irq(int id, void *irq_handler, unsigned long arg, char *name);
void retu_free_irq(int id);
@@ -78,7 +78,7 @@ EXPORT_SYMBOL(tahvo_get_status);
*
* This function returns the contents of the specified register
*/
-int tahvo_read_reg(int reg)
+int tahvo_read_reg(unsigned reg)
{
BUG_ON(!tahvo_initialized);
return cbus_read_reg(TAHVO_ID, reg);
@@ -91,7 +91,7 @@ int tahvo_read_reg(int reg)
*
* This function writes a value to the specified register
*/
-void tahvo_write_reg(int reg, u16 val)
+void tahvo_write_reg(unsigned reg, u16 val)
{
BUG_ON(!tahvo_initialized);
cbus_write_reg(TAHVO_ID, reg, val);
@@ -104,7 +104,7 @@ void tahvo_write_reg(int reg, u16 val)
*
* This function sets and clears the specified Tahvo register bits atomically
*/
-void tahvo_set_clear_reg_bits(int reg, u16 set, u16 clear)
+void tahvo_set_clear_reg_bits(unsigned reg, u16 set, u16 clear)
{
unsigned long flags;
u16 w;
@@ -40,9 +40,9 @@
#define MAX_TAHVO_IRQ_HANDLERS 8
int tahvo_get_status(void);
-int tahvo_read_reg(int reg);
-void tahvo_write_reg(int reg, u16 val);
-void tahvo_set_clear_reg_bits(int reg, u16 set, u16 clear);
+int tahvo_read_reg(unsigned reg);
+void tahvo_write_reg(unsigned reg, u16 val);
+void tahvo_set_clear_reg_bits(unsigned reg, u16 set, u16 clear);
int tahvo_request_irq(int id, void *irq_handler, unsigned long arg, char *name);
void tahvo_free_irq(int id);
void tahvo_enable_irq(int id);