drivers: resolve compilation time warnings
Sanjay Singh Rawat [Wed, 28 Mar 2012 12:14:56 +0000 (17:14 +0530)]
bug 949219

Change-Id: I5942ba86bd1cbe1f1bd06a7c9f51a10d83e6cabb
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/92819
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

12 files changed:
drivers/hwmon/tegra-tsensor.c
drivers/input/touchscreen/rmi4/rmi_bus.c
drivers/input/touchscreen/rmi4/rmi_spi.c
drivers/media/video/tegra/ar0832_main.c
drivers/misc/nct1008.c
drivers/mmc/host/sdhci.c
drivers/net/usb/cdc_subset.c
drivers/power/max17048_battery.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ehci.h
include/linux/smb349-charger.h
include/linux/wl12xx.h

index 481b132..28597ef 100644 (file)
@@ -1542,7 +1542,7 @@ static int tsensor_within_limits(struct tegra_tsensor_data *data)
 
 static void tsensor_work_func(struct work_struct *work)
 {
-       struct tegra_tsensor_data *data = container_of(work,
+       struct tegra_tsensor_data *data = container_of(to_delayed_work(work),
                struct tegra_tsensor_data, work);
 
        if (!data->alert_func)
index 6a269df..def8a20 100644 (file)
@@ -39,17 +39,15 @@ static int rmi_bus_match(struct device *dev, struct device_driver *driver)
        rmi_dev = to_rmi_device(dev);
        pdata = to_rmi_platform_data(rmi_dev);
 
-       pr_info("        rmi_driver->driver.name =  %s\n", rmi_driver->driver.name);
-        pr_info("        device:rmi_device = 0x%x \n", rmi_dev);
-       pr_info("             device:rmi_device:rmi_device_platform_data:driver_name = %s \n", pdata->driver_name);
-        pr_info("                    rmi_device:driver = 0x%x \n", rmi_dev->driver);
+       pr_info("rmi_driver->driver.name =  %s\n", rmi_driver->driver.name);
+       pr_info("device:rmi_device:rmi_device_platform_data:driver_name = %s\n",
+               pdata->driver_name);
 
        if (!strcmp(pdata->driver_name, rmi_driver->driver.name)) {
                rmi_dev->driver = rmi_driver;
-               pr_info("             names match, so now rmi_device:driver = 0x%x \n",rmi_dev->driver);
                return 1;
        }
-       pr_info("             names DO NOT match, so return nothing \n");
+       pr_info("names DO NOT match, so return nothing\n");
 
        return 0;
 }
@@ -151,9 +149,9 @@ int rmi_register_phys_device(struct rmi_phys_device *phys)
        dev_set_name(&rmi_dev->dev, "sensor%02d", phys_device_num++);
 
        phys->rmi_dev = rmi_dev;
-       pr_info("                 registering physical device:\n");
-       pr_info("                 dev.init_name = \n", rmi_dev->dev.init_name);
-       pr_info("                 dev.bus->name = \n", rmi_dev->dev.bus->name);
+       pr_info("registering physical device:\n");
+       pr_info("dev.init_name = %s\n", rmi_dev->dev.init_name);
+       pr_info("dev.bus->name = %s\n", rmi_dev->dev.bus->name);
        return device_register(&rmi_dev->dev);
 }
 EXPORT_SYMBOL(rmi_register_phys_device);
index 41f7265..71c98bc 100644 (file)
@@ -523,19 +523,16 @@ static int rmi_spi_v2_set_page(struct rmi_phys_device *phys, u8 page)
 static int acquire_attn_irq(struct rmi_spi_data *data)
 {
         int retval = 0;
-        pr_info("in function ____%s____  \n", __func__);
-        pr_info("          irq = %d\n", data->irq);
-        pr_info("          rmi_spi_hard_irq          = 0x%8x\n", rmi_spi_hard_irq);
-        pr_info("          rmi_spi_irq_thread        = 0x%8x\n", rmi_spi_irq_thread);
-        pr_info("          data->irq_flags           = 0x%8x\n", data->irq_flags);
-        pr_info("          dev_name(data->phys->dev) = %s\n", dev_name(data->phys->dev));
-        pr_info("          data->phys                = 0x%8x\n", data->phys);
+       pr_info("in function ____%s____\n", __func__);
+       pr_info("irq = %d\n", data->irq);
+       pr_info("data->irq_flags = 0x%8x\n", data->irq_flags);
+       pr_info("dev_name(data->phys->dev) = %s\n", dev_name(data->phys->dev));
 
        retval =  request_threaded_irq(data->irq, rmi_spi_hard_irq,
                        rmi_spi_irq_thread, data->irq_flags,
                        dev_name(data->phys->dev), data->phys);
 
-        pr_info("          retval =                  = %d\n", retval);
+       pr_info("retval = %d\n", retval);
        return retval;
 }
 
index 129825c..dc0762a 100644 (file)
@@ -1977,7 +1977,7 @@ static int ar0832_focuser_set_position(struct ar0832_dev *dev,
        return ret;
 }
 
-
+#ifdef AR0832_FOCUSER_DYNAMIC_STEP_TIME
 /*
  * This function is not currently called as we have the hardcoded
  * step time in ar0832_focuser_set_config function. If we need to
@@ -2033,6 +2033,7 @@ static u16 ar0832_get_focuser_vcm_step_time(struct ar0832_dev *dev)
        return vt_pix_clk_freq_mhz;
 
 }
+#endif
 
 static inline
 int ar0832_get_sensorid(struct ar0832_dev *dev, u16 *sensor_id)
@@ -2148,7 +2149,6 @@ static long ar0832_ioctl(struct file *file,
        }
        case AR0832_IOCTL_SET_SENSOR_REGION:
        {
-               struct ar0832_stereo_region region;
                dev_dbg(&i2c_client->dev, "AR0832_IOCTL_SET_SENSOR_REGION\n");
                /* Right now, it doesn't do anything */
 
index 8931c8a..56678a7 100644 (file)
@@ -810,7 +810,6 @@ static int __devinit nct1008_probe(struct i2c_client *client,
 {
        struct nct1008_data *data;
        int err;
-       unsigned int delay;
 
        data = kzalloc(sizeof(struct nct1008_data), GFP_KERNEL);
        if (!data)
@@ -897,7 +896,6 @@ static int nct1008_suspend(struct i2c_client *client, pm_message_t state)
 
 static int nct1008_resume(struct i2c_client *client)
 {
-       struct nct1008_data *data = i2c_get_clientdata(client);
        int err;
 
        err = nct1008_enable(client);
index c6822c3..e0eeb34 100644 (file)
@@ -1352,7 +1352,6 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 
        if (host->version >= SDHCI_SPEC_300) {
                u16 clk, ctrl_2;
-               unsigned int clock;
 
                /* In case of UHS-I modes, set High Speed Enable */
                if (((ios->timing == MMC_TIMING_UHS_SDR50) ||
index fc5f13d..47eac7b 100644 (file)
@@ -222,13 +222,8 @@ static const struct driver_info    blob_info = {
 
 #endif /* CONFIG_USB_ARMLINUX */
 
-\f
 /*-------------------------------------------------------------------------*/
 
-#ifndef        HAVE_HARDWARE
-#warning You need to configure some hardware for this driver
-#endif
-
 /*
  * chip vendor names won't normally be on the cables, and
  * may not be on the device.
index e433909..e5cdfa8 100644 (file)
@@ -276,13 +276,18 @@ static int max17048_write_rcomp_seg(struct i2c_client *client,
 {
        uint8_t rs1, rs2;
        int ret;
+       uint8_t rcomp_seg_table[16];
 
        rs2 = rcomp_seg | 0x00FF;
        rs1 = rcomp_seg >> 8;
-       uint8_t rcomp_seg_table[16] = { rs1, rs2, rs1, rs2,
-                                       rs1, rs2, rs1, rs2,
-                                       rs1, rs2, rs1, rs2,
-                                       rs1, rs2, rs1, rs2};
+
+       rcomp_seg_table[0] = rcomp_seg_table[2] = rcomp_seg_table[4] =
+               rcomp_seg_table[6] = rcomp_seg_table[8] = rcomp_seg_table[10] =
+                       rcomp_seg_table[12] = rcomp_seg_table[14] = rs1;
+
+       rcomp_seg_table[1] = rcomp_seg_table[3] = rcomp_seg_table[5] =
+               rcomp_seg_table[7] = rcomp_seg_table[9] = rcomp_seg_table[11] =
+                       rcomp_seg_table[13] = rcomp_seg_table[15] = rs2;
 
        ret = i2c_smbus_write_i2c_block_data(client, MAX17048_RCOMPSEG1,
                                16, (uint8_t *)rcomp_seg_table);
index 324fc7a..fae63e2 100644 (file)
@@ -578,7 +578,6 @@ static int tegra_usb_suspend(struct usb_hcd *hcd, bool is_dpd)
 static int tegra_usb_resume(struct usb_hcd *hcd, bool is_dpd)
 {
        struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller);
-       struct usb_device *udev = hcd->self.root_hub;
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
        struct ehci_regs __iomem *hw = ehci->regs;
        unsigned long val;
index e897262..509934c 100644 (file)
@@ -762,7 +762,7 @@ static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci)
  * descriptor to memory.
  * */
 #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
-static inline void ehci_sync_mem()
+static inline void ehci_sync_mem(void)
 {
        mb();
 }
index 6dbec61..19e7aa6 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/regulator/machine.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/driver.h>
+#include <linux/usb/otg.h>
 
 struct smb349_charger_platform_data {
        int regulator_id;
index 0f559ae..c13dc0c 100644 (file)
@@ -48,8 +48,8 @@ enum {
 };
 
 struct wl12xx_platform_data {
-       void (*set_power)(bool enable);
-       void (*set_carddetect)(bool enable);
+       int (*set_power)(int power_on);
+       int (*set_carddetect)(int val);
        /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
        int irq;
        bool use_eeprom;