diff options
author | Sanjay Singh Rawat <srawat@nvidia.com> | 2012-03-28 17:44:56 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-04-19 05:00:13 -0700 |
commit | bdd8ce3b99c4ff20dc2f83698c1dc3ae5780fe30 (patch) | |
tree | 3cc970a567b781c7259d7aa85fa6c8405a43401f | |
parent | 20395e4c50ceea0d114c9beaaa5fa0e18b87915e (diff) |
drivers: resolve compilation time warnings
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>
-rw-r--r-- | drivers/hwmon/tegra-tsensor.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/rmi4/rmi_bus.c | 16 | ||||
-rw-r--r-- | drivers/input/touchscreen/rmi4/rmi_spi.c | 13 | ||||
-rw-r--r-- | drivers/media/video/tegra/ar0832_main.c | 4 | ||||
-rw-r--r-- | drivers/misc/nct1008.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 1 | ||||
-rw-r--r-- | drivers/net/usb/cdc_subset.c | 5 | ||||
-rw-r--r-- | drivers/power/max17048_battery.c | 13 | ||||
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 2 | ||||
-rw-r--r-- | include/linux/smb349-charger.h | 1 | ||||
-rw-r--r-- | include/linux/wl12xx.h | 4 |
12 files changed, 28 insertions, 36 deletions
diff --git a/drivers/hwmon/tegra-tsensor.c b/drivers/hwmon/tegra-tsensor.c index 481b13203e81..28597ef4cc98 100644 --- a/drivers/hwmon/tegra-tsensor.c +++ b/drivers/hwmon/tegra-tsensor.c @@ -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) diff --git a/drivers/input/touchscreen/rmi4/rmi_bus.c b/drivers/input/touchscreen/rmi4/rmi_bus.c index 6a269df4ff35..def8a2083d98 100644 --- a/drivers/input/touchscreen/rmi4/rmi_bus.c +++ b/drivers/input/touchscreen/rmi4/rmi_bus.c @@ -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); diff --git a/drivers/input/touchscreen/rmi4/rmi_spi.c b/drivers/input/touchscreen/rmi4/rmi_spi.c index 41f72657f829..71c98bc48453 100644 --- a/drivers/input/touchscreen/rmi4/rmi_spi.c +++ b/drivers/input/touchscreen/rmi4/rmi_spi.c @@ -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; } diff --git a/drivers/media/video/tegra/ar0832_main.c b/drivers/media/video/tegra/ar0832_main.c index 129825cd5f83..dc0762a0c432 100644 --- a/drivers/media/video/tegra/ar0832_main.c +++ b/drivers/media/video/tegra/ar0832_main.c @@ -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 */ diff --git a/drivers/misc/nct1008.c b/drivers/misc/nct1008.c index 8931c8a673e5..56678a795497 100644 --- a/drivers/misc/nct1008.c +++ b/drivers/misc/nct1008.c @@ -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); diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index c6822c39541c..e0eeb3484960 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -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) || diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index fc5f13d47ad9..47eac7b92372 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c @@ -222,13 +222,8 @@ static const struct driver_info blob_info = { #endif /* CONFIG_USB_ARMLINUX */ - /*-------------------------------------------------------------------------*/ -#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. diff --git a/drivers/power/max17048_battery.c b/drivers/power/max17048_battery.c index e43390984522..e5cdfa878267 100644 --- a/drivers/power/max17048_battery.c +++ b/drivers/power/max17048_battery.c @@ -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); diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 324fc7ad9522..fae63e219803 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -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; diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index e897262c6a60..509934ceb4a9 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -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(); } diff --git a/include/linux/smb349-charger.h b/include/linux/smb349-charger.h index 6dbec61034ed..19e7aa6f5e73 100644 --- a/include/linux/smb349-charger.h +++ b/include/linux/smb349-charger.h @@ -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; diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h index 0f559ae411c8..c13dc0c0f4c3 100644 --- a/include/linux/wl12xx.h +++ b/include/linux/wl12xx.h @@ -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; |