cleanup compile warnings/errors

This commit is contained in:
James Sullins
2012-02-17 01:26:52 -06:00
parent baef96b5d6
commit c7f722681a
2 changed files with 10 additions and 7 deletions

View File

@@ -406,7 +406,7 @@ static void lsm303dlh_acc_irq1_work_func(struct work_struct *work)
; ;
/* */ /* */
printk(KERN_INFO "%s: IRQ1 triggered\n", LSM303DLH_ACC_DEV_NAME); printk(KERN_INFO "%s: IRQ1 triggered\n", LSM303DLH_ACC_DEV_NAME);
exit: //exit:
enable_irq(acc->irq1); enable_irq(acc->irq1);
} }
@@ -421,7 +421,7 @@ static void lsm303dlh_acc_irq2_work_func(struct work_struct *work)
/* */ /* */
printk(KERN_INFO "%s: IRQ2 triggered\n", LSM303DLH_ACC_DEV_NAME); printk(KERN_INFO "%s: IRQ2 triggered\n", LSM303DLH_ACC_DEV_NAME);
exit: //exit:
enable_irq(acc->irq2); enable_irq(acc->irq2);
} }
@@ -1436,7 +1436,7 @@ static int __init lsm303dlh_acc_init(void)
static void __exit lsm303dlh_acc_exit(void) static void __exit lsm303dlh_acc_exit(void)
{ {
#if DEBUG #ifdef DEBUG
printk(KERN_DEBUG "%s accelerometer driver exit\n", printk(KERN_DEBUG "%s accelerometer driver exit\n",
LSM303DLH_ACC_DEV_NAME); LSM303DLH_ACC_DEV_NAME);
#endif #endif

View File

@@ -38,6 +38,9 @@
#include <linux/i2c/lsm303dlh.h> #include <linux/i2c/lsm303dlh.h>
#ifndef DEBUG
#define DEBUG 0
#endif
/** Maximum polled-device-reported g value */ /** Maximum polled-device-reported g value */
#define H_MAX 8100 #define H_MAX 8100
@@ -958,8 +961,8 @@ static int lsm303dlh_mag_remove(struct i2c_client *client)
static int lsm303dlh_mag_suspend(struct device *dev) static int lsm303dlh_mag_suspend(struct device *dev)
{ {
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
struct i2c_client *client = to_i2c_client(dev); // struct i2c_client *client = to_i2c_client(dev);
struct lsm303dlh_data *gyro = i2c_get_clientdata(client); // struct lsm303dlh_data *gyro = i2c_get_clientdata(client);
#if DEBUG #if DEBUG
pr_info(KERN_INFO "lsm303dlh_suspend\n"); pr_info(KERN_INFO "lsm303dlh_suspend\n");
#endif #endif
@@ -971,8 +974,8 @@ static int lsm303dlh_mag_suspend(struct device *dev)
static int lsm303dlh_mag_resume(struct device *dev) static int lsm303dlh_mag_resume(struct device *dev)
{ {
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
struct i2c_client *client = to_i2c_client(dev); // struct i2c_client *client = to_i2c_client(dev);
struct lsm303dlh_data *mag = i2c_get_clientdata(client); // struct lsm303dlh_data *mag = i2c_get_clientdata(client);
#if DEBUG #if DEBUG
pr_info(KERN_INFO "lsm303dlh_resume\n"); pr_info(KERN_INFO "lsm303dlh_resume\n");
#endif #endif