Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use module_i2c_driver() #88

Open
wants to merge 3 commits into
base: cm-12.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions drivers/sensors_ancora/ak8975.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,18 +435,7 @@ static struct i2c_driver akm8975_driver = {
},
};

static int __init akm8975_init(void)
{
return i2c_add_driver(&akm8975_driver);
}

static void __exit akm8975_exit(void)
{
i2c_del_driver(&akm8975_driver);
}

module_init(akm8975_init);
module_exit(akm8975_exit);
module_i2c_driver(akm8975_driver);

MODULE_DESCRIPTION("AKM8975 compass driver");
MODULE_LICENSE("GPL");
Expand Down
12 changes: 1 addition & 11 deletions drivers/sensors_ancora/bma_accel_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,17 +1164,7 @@ struct i2c_driver bma_acc_driver = {
/* ---------------------------------------------------------------------------------------- *
Module init and exit
* ---------------------------------------------------------------------------------------- */
static int __init bma_acc_init(void)
{
return i2c_add_driver(&bma_acc_driver);
}
module_init(bma_acc_init);

static void __exit bma_acc_exit(void)
{
i2c_del_driver(&bma_acc_driver);
}
module_exit(bma_acc_exit);
module_i2c_driver(bma_acc_driver);

MODULE_DESCRIPTION("accelerometer kernel driver");
MODULE_LICENSE("GPL");
Expand Down
17 changes: 1 addition & 16 deletions drivers/sensors_ancora/gp2a_proximity.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,22 +738,7 @@ static struct platform_driver gp2a_opt_driver = {
},
};

static int __init gp2a_opt_init(void)
{
int ret;

ret = platform_driver_register(&gp2a_opt_driver);
return ret;


}
static void __exit gp2a_opt_exit(void)
{
platform_driver_unregister(&gp2a_opt_driver);
}

module_init( gp2a_opt_init );
module_exit( gp2a_opt_exit );
module_i2c_driver(gp2a_opt_driver);

MODULE_AUTHOR("SAMSUNG");
MODULE_DESCRIPTION("Optical Sensor driver for GP2AP002A00F");
Expand Down