Skip to content

Commit

Permalink
Merge tag 'char-misc-3.3' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/gregkh/char-misc

Pull char and misc patches for 3.4-rc1 from Greg KH:
 "Not much here, just a few minor fixes and some conversions to the
  module_*_driver() functions, making the codebase smaller."

* tag 'char-misc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  misc: bmp085: Use unsigned long to store jiffies
  char/ramoops: included linux/err.h twice
  misc: bmp085: Handle jiffies overflow correctly
  misc: fsa9480: Remove obsolete cleanup for clientdata
  char: Fix typo in tlclk.c
  char: Fix typo in viotape.c
  cs5535-mfgpt: don't call __init function from __devinit
  MISC: convert drivers/misc/* to use module_spi_driver()
  MISC: convert drivers/misc/* to use module_i2c_driver()
  MISC: convert drivers/misc/* to use module_platform_driver()
  • Loading branch information
Linus Torvalds committed Mar 20, 2012
2 parents ad2a8e6 + b222258 commit 9f9d276
Show file tree
Hide file tree
Showing 29 changed files with 32 additions and 309 deletions.
1 change: 0 additions & 1 deletion drivers/char/ramoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/module.h>
#include <linux/kmsg_dump.h>
#include <linux/time.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tlclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ static int __init tlclk_init(void)
telclk_interrupt = (inb(TLCLK_REG7) & 0x0f);

if (0x0F == telclk_interrupt ) { /* not MCPBL0010 ? */
printk(KERN_ERR "telclk_interrup = 0x%x non-mcpbl0010 hw.\n",
printk(KERN_ERR "telclk_interrupt = 0x%x non-mcpbl0010 hw.\n",
telclk_interrupt);
ret = -ENXIO;
goto out3;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/viotape.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ int __init viotap_init(void)

tape_class = class_create(THIS_MODULE, "tape");
if (IS_ERR(tape_class)) {
printk(VIOTAPE_KERN_WARN "Unable to allocat class\n");
printk(VIOTAPE_KERN_WARN "Unable to allocate class\n");
ret = PTR_ERR(tape_class);
goto unreg_chrdev;
}
Expand Down
12 changes: 1 addition & 11 deletions drivers/misc/ad525x_dpot-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,7 @@ static struct i2c_driver ad_dpot_i2c_driver = {
.id_table = ad_dpot_id,
};

static int __init ad_dpot_i2c_init(void)
{
return i2c_add_driver(&ad_dpot_i2c_driver);
}
module_init(ad_dpot_i2c_init);

static void __exit ad_dpot_i2c_exit(void)
{
i2c_del_driver(&ad_dpot_i2c_driver);
}
module_exit(ad_dpot_i2c_exit);
module_i2c_driver(ad_dpot_i2c_driver);

MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("digital potentiometer I2C bus driver");
Expand Down
12 changes: 1 addition & 11 deletions drivers/misc/ad525x_dpot-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,7 @@ static struct spi_driver ad_dpot_spi_driver = {
.id_table = ad_dpot_spi_id,
};

static int __init ad_dpot_spi_init(void)
{
return spi_register_driver(&ad_dpot_spi_driver);
}
module_init(ad_dpot_spi_init);

static void __exit ad_dpot_spi_exit(void)
{
spi_unregister_driver(&ad_dpot_spi_driver);
}
module_exit(ad_dpot_spi_exit);
module_spi_driver(ad_dpot_spi_driver);

MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("digital potentiometer SPI bus driver");
Expand Down
12 changes: 1 addition & 11 deletions drivers/misc/apds9802als.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,7 @@ static struct i2c_driver apds9802als_driver = {
.id_table = apds9802als_id,
};

static int __init sensor_apds9802als_init(void)
{
return i2c_add_driver(&apds9802als_driver);
}

static void __exit sensor_apds9802als_exit(void)
{
i2c_del_driver(&apds9802als_driver);
}
module_init(sensor_apds9802als_init);
module_exit(sensor_apds9802als_exit);
module_i2c_driver(apds9802als_driver);

MODULE_AUTHOR("Anantha Narayanan <Anantha.Narayanan@intel.com");
MODULE_DESCRIPTION("Avago apds9802als ALS Driver");
Expand Down
13 changes: 1 addition & 12 deletions drivers/misc/apds990x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,19 +1279,8 @@ static struct i2c_driver apds990x_driver = {
.id_table = apds990x_id,
};

static int __init apds990x_init(void)
{
return i2c_add_driver(&apds990x_driver);
}

static void __exit apds990x_exit(void)
{
i2c_del_driver(&apds990x_driver);
}
module_i2c_driver(apds990x_driver);

MODULE_DESCRIPTION("APDS990X combined ALS and proximity sensor");
MODULE_AUTHOR("Samu Onkalo, Nokia Corporation");
MODULE_LICENSE("GPL v2");

module_init(apds990x_init);
module_exit(apds990x_exit);
13 changes: 1 addition & 12 deletions drivers/misc/bh1770glc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,19 +1399,8 @@ static struct i2c_driver bh1770_driver = {
.id_table = bh1770_id,
};

static int __init bh1770_init(void)
{
return i2c_add_driver(&bh1770_driver);
}

static void __exit bh1770_exit(void)
{
i2c_del_driver(&bh1770_driver);
}
module_i2c_driver(bh1770_driver);

MODULE_DESCRIPTION("BH1770GLC / SFH7770 combined ALS and proximity sensor");
MODULE_AUTHOR("Samu Onkalo, Nokia Corporation");
MODULE_LICENSE("GPL v2");

module_init(bh1770_init);
module_exit(bh1770_exit);
15 changes: 2 additions & 13 deletions drivers/misc/bh1780gli.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,21 +253,10 @@ static struct i2c_driver bh1780_driver = {
.driver = {
.name = "bh1780",
.pm = BH1780_PMOPS,
},
},
};

static int __init bh1780_init(void)
{
return i2c_add_driver(&bh1780_driver);
}

static void __exit bh1780_exit(void)
{
i2c_del_driver(&bh1780_driver);
}

module_init(bh1780_init)
module_exit(bh1780_exit)
module_i2c_driver(bh1780_driver);

MODULE_DESCRIPTION("BH1780GLI Ambient Light Sensor Driver");
MODULE_LICENSE("GPL");
Expand Down
19 changes: 4 additions & 15 deletions drivers/misc/bmp085.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct bmp085_data {
u32 raw_temperature;
u32 raw_pressure;
unsigned char oversampling_setting;
u32 last_temp_measurement;
unsigned long last_temp_measurement;
s32 b6; /* calculated temperature correction coefficient */
};

Expand Down Expand Up @@ -234,7 +234,8 @@ static s32 bmp085_get_pressure(struct bmp085_data *data, int *pressure)
int status;

/* alt least every second force an update of the ambient temperature */
if (data->last_temp_measurement + 1*HZ < jiffies) {
if (data->last_temp_measurement == 0 ||
time_is_before_jiffies(data->last_temp_measurement + 1*HZ)) {
status = bmp085_get_temperature(data, NULL);
if (status != 0)
goto exit;
Expand Down Expand Up @@ -464,20 +465,8 @@ static struct i2c_driver bmp085_driver = {
.address_list = normal_i2c
};

static int __init bmp085_init(void)
{
return i2c_add_driver(&bmp085_driver);
}

static void __exit bmp085_exit(void)
{
i2c_del_driver(&bmp085_driver);
}

module_i2c_driver(bmp085_driver);

MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com");
MODULE_DESCRIPTION("BMP085 driver");
MODULE_LICENSE("GPL");

module_init(bmp085_init);
module_exit(bmp085_exit);
17 changes: 1 addition & 16 deletions drivers/misc/carma/carma-fpga.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,23 +1410,8 @@ static struct platform_driver data_of_driver = {
},
};

/*
* Module Init / Exit
*/

static int __init data_init(void)
{
return platform_driver_register(&data_of_driver);
}

static void __exit data_exit(void)
{
platform_driver_unregister(&data_of_driver);
}
module_platform_driver(data_of_driver);

MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver");
MODULE_LICENSE("GPL");

module_init(data_init);
module_exit(data_exit);
2 changes: 1 addition & 1 deletion drivers/misc/cs5535-mfgpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ EXPORT_SYMBOL_GPL(cs5535_mfgpt_write);
* Jordan tells me that he and Mitch once played w/ it, but it's unclear
* what the results of that were (and they experienced some instability).
*/
static void __init reset_all_timers(void)
static void __devinit reset_all_timers(void)
{
uint32_t val, dummy;

Expand Down
13 changes: 1 addition & 12 deletions drivers/misc/ds1682.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,19 +250,8 @@ static struct i2c_driver ds1682_driver = {
.id_table = ds1682_id,
};

static int __init ds1682_init(void)
{
return i2c_add_driver(&ds1682_driver);
}

static void __exit ds1682_exit(void)
{
i2c_del_driver(&ds1682_driver);
}
module_i2c_driver(ds1682_driver);

MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
MODULE_DESCRIPTION("DS1682 Elapsed Time Indicator driver");
MODULE_LICENSE("GPL");

module_init(ds1682_init);
module_exit(ds1682_exit);
12 changes: 1 addition & 11 deletions drivers/misc/eeprom/at25.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,7 @@ static struct spi_driver at25_driver = {
.remove = __devexit_p(at25_remove),
};

static int __init at25_init(void)
{
return spi_register_driver(&at25_driver);
}
module_init(at25_init);

static void __exit at25_exit(void)
{
spi_unregister_driver(&at25_driver);
}
module_exit(at25_exit);
module_spi_driver(at25_driver);

MODULE_DESCRIPTION("Driver for most SPI EEPROMs");
MODULE_AUTHOR("David Brownell");
Expand Down
14 changes: 1 addition & 13 deletions drivers/misc/eeprom/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,22 +229,10 @@ static struct i2c_driver eeprom_driver = {
.address_list = normal_i2c,
};

static int __init eeprom_init(void)
{
return i2c_add_driver(&eeprom_driver);
}

static void __exit eeprom_exit(void)
{
i2c_del_driver(&eeprom_driver);
}

module_i2c_driver(eeprom_driver);

MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and "
"Philip Edelbrock <phil@netroedge.com> and "
"Greg Kroah-Hartman <greg@kroah.com>");
MODULE_DESCRIPTION("I2C EEPROM driver");
MODULE_LICENSE("GPL");

module_init(eeprom_init);
module_exit(eeprom_exit);
12 changes: 1 addition & 11 deletions drivers/misc/eeprom/eeprom_93xx46.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,7 @@ static struct spi_driver eeprom_93xx46_driver = {
.remove = __devexit_p(eeprom_93xx46_remove),
};

static int __init eeprom_93xx46_init(void)
{
return spi_register_driver(&eeprom_93xx46_driver);
}
module_init(eeprom_93xx46_init);

static void __exit eeprom_93xx46_exit(void)
{
spi_unregister_driver(&eeprom_93xx46_driver);
}
module_exit(eeprom_93xx46_exit);
module_spi_driver(eeprom_93xx46_driver);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs");
Expand Down
14 changes: 1 addition & 13 deletions drivers/misc/eeprom/max6875.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,20 +208,8 @@ static struct i2c_driver max6875_driver = {
.id_table = max6875_id,
};

static int __init max6875_init(void)
{
return i2c_add_driver(&max6875_driver);
}

static void __exit max6875_exit(void)
{
i2c_del_driver(&max6875_driver);
}

module_i2c_driver(max6875_driver);

MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>");
MODULE_DESCRIPTION("MAX6875 driver");
MODULE_LICENSE("GPL");

module_init(max6875_init);
module_exit(max6875_exit);
14 changes: 1 addition & 13 deletions drivers/misc/fsa9480.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ static int __devinit fsa9480_probe(struct i2c_client *client,
if (client->irq)
free_irq(client->irq, usbsw);
fail1:
i2c_set_clientdata(client, NULL);
kfree(usbsw);
return ret;
}
Expand All @@ -468,7 +467,6 @@ static int __devexit fsa9480_remove(struct i2c_client *client)
struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client);
if (client->irq)
free_irq(client->irq, usbsw);
i2c_set_clientdata(client, NULL);

sysfs_remove_group(&client->dev.kobj, &fsa9480_group);
device_init_wakeup(&client->dev, 0);
Expand Down Expand Up @@ -541,17 +539,7 @@ static struct i2c_driver fsa9480_i2c_driver = {
.id_table = fsa9480_id,
};

static int __init fsa9480_init(void)
{
return i2c_add_driver(&fsa9480_i2c_driver);
}
module_init(fsa9480_init);

static void __exit fsa9480_exit(void)
{
i2c_del_driver(&fsa9480_i2c_driver);
}
module_exit(fsa9480_exit);
module_i2c_driver(fsa9480_i2c_driver);

MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>");
MODULE_DESCRIPTION("FSA9480 USB Switch driver");
Expand Down
13 changes: 1 addition & 12 deletions drivers/misc/hmc6352.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,7 @@ static struct i2c_driver hmc6352_driver = {
.id_table = hmc6352_id,
};

static int __init sensor_hmc6352_init(void)
{
return i2c_add_driver(&hmc6352_driver);
}

static void __exit sensor_hmc6352_exit(void)
{
i2c_del_driver(&hmc6352_driver);
}

module_init(sensor_hmc6352_init);
module_exit(sensor_hmc6352_exit);
module_i2c_driver(hmc6352_driver);

MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com");
MODULE_DESCRIPTION("hmc6352 Compass Driver");
Expand Down
Loading

0 comments on commit 9f9d276

Please sign in to comment.