return hdaps_device_init();
}
- static struct device_driver hdaps_driver = {
- .name = "hdaps",
- .bus = &platform_bus_type,
- .owner = THIS_MODULE,
+ static struct platform_driver hdaps_driver = {
.probe = hdaps_probe,
- .resume = hdaps_resume
+ .resume = hdaps_resume,
+ .driver = {
+ .name = "hdaps",
+ .owner = THIS_MODULE,
+ },
};
-/* Input class stuff */
-
-static struct input_dev hdaps_idev = {
- .name = "hdaps",
- .evbit = { BIT(EV_ABS) },
- .absbit = { BIT(ABS_X) | BIT(ABS_Y) },
- .absmin = { [ABS_X] = -256, [ABS_Y] = -256 },
- .absmax = { [ABS_X] = 256, [ABS_Y] = 256 },
- .absfuzz = { [ABS_X] = HDAPS_INPUT_FUZZ, [ABS_Y] = HDAPS_INPUT_FUZZ },
- .absflat = { [ABS_X] = HDAPS_INPUT_FUZZ, [ABS_Y] = HDAPS_INPUT_FUZZ },
-};
-
/*
* hdaps_calibrate - Set our "resting" values. Callers must hold hdaps_sem.
*/
static void __exit hdaps_exit(void)
{
del_timer_sync(&hdaps_timer);
- input_unregister_device(&hdaps_idev);
+ input_unregister_device(hdaps_idev);
sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
platform_device_unregister(pdev);
- driver_unregister(&hdaps_driver);
+ platform_driver_unregister(&hdaps_driver);
release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
printk(KERN_INFO "hdaps: driver unloaded.\n");
static struct platform_device *wbsd_device;
- static struct device_driver wbsd_driver = {
- .name = DRIVER_NAME,
- .bus = &platform_bus_type,
+ static struct platform_driver wbsd_driver = {
.probe = wbsd_probe,
- .remove = wbsd_remove,
+ .remove = __devexit_p(wbsd_remove),
.suspend = wbsd_suspend,
.resume = wbsd_resume,