summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-02-22 20:01:33 -0700
committerGrant Likely <grant.likely@secretlab.ca>2011-02-28 01:36:39 -0700
commit4ebb24f707187196937607c60810d42f7112d7aa (patch)
tree89a92b3f8dd55f3c5e0cfa73fa6446b3d490f3a8 /drivers/input
parent000061245a6797d542854106463b6b20fbdcb12e (diff)
dt/sparc: Eliminate users of of_platform_{,un}register_driver
Get rid of old users of of_platform_driver in arch/sparc. Most of_platform_driver users can be converted to use the platform_bus directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/sparcspkr.c22
-rw-r--r--drivers/input/serio/i8042-sparcio.h8
2 files changed, 14 insertions, 16 deletions
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index 8e130bf7d32b..0122f5351577 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -173,18 +173,16 @@ static int __devinit sparcspkr_probe(struct device *dev)
return 0;
}
-static int sparcspkr_shutdown(struct platform_device *dev)
+static void sparcspkr_shutdown(struct platform_device *dev)
{
struct sparcspkr_state *state = dev_get_drvdata(&dev->dev);
struct input_dev *input_dev = state->input_dev;
/* turn off the speaker */
state->event(input_dev, EV_SND, SND_BELL, 0);
-
- return 0;
}
-static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit bbc_beep_probe(struct platform_device *op)
{
struct sparcspkr_state *state;
struct bbc_beep_info *info;
@@ -258,7 +256,7 @@ static const struct of_device_id bbc_beep_match[] = {
{},
};
-static struct of_platform_driver bbc_beep_driver = {
+static struct platform_driver bbc_beep_driver = {
.driver = {
.name = "bbcbeep",
.owner = THIS_MODULE,
@@ -269,7 +267,7 @@ static struct of_platform_driver bbc_beep_driver = {
.shutdown = sparcspkr_shutdown,
};
-static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit grover_beep_probe(struct platform_device *op)
{
struct sparcspkr_state *state;
struct grover_beep_info *info;
@@ -340,7 +338,7 @@ static const struct of_device_id grover_beep_match[] = {
{},
};
-static struct of_platform_driver grover_beep_driver = {
+static struct platform_driver grover_beep_driver = {
.driver = {
.name = "groverbeep",
.owner = THIS_MODULE,
@@ -353,12 +351,12 @@ static struct of_platform_driver grover_beep_driver = {
static int __init sparcspkr_init(void)
{
- int err = of_register_platform_driver(&bbc_beep_driver);
+ int err = platform_driver_register(&bbc_beep_driver);
if (!err) {
- err = of_register_platform_driver(&grover_beep_driver);
+ err = platform_driver_register(&grover_beep_driver);
if (err)
- of_unregister_platform_driver(&bbc_beep_driver);
+ platform_driver_unregister(&bbc_beep_driver);
}
return err;
@@ -366,8 +364,8 @@ static int __init sparcspkr_init(void)
static void __exit sparcspkr_exit(void)
{
- of_unregister_platform_driver(&bbc_beep_driver);
- of_unregister_platform_driver(&grover_beep_driver);
+ platform_driver_unregister(&bbc_beep_driver);
+ platform_driver_unregister(&grover_beep_driver);
}
module_init(sparcspkr_init);
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index c5cc4508d6df..395a9af3adcd 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -49,7 +49,7 @@ static inline void i8042_write_command(int val)
#define OBP_PS2MS_NAME1 "kdmouse"
#define OBP_PS2MS_NAME2 "mouse"
-static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit sparc_i8042_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
@@ -95,7 +95,7 @@ static const struct of_device_id sparc_i8042_match[] = {
};
MODULE_DEVICE_TABLE(of, sparc_i8042_match);
-static struct of_platform_driver sparc_i8042_driver = {
+static struct platform_driver sparc_i8042_driver = {
.driver = {
.name = "i8042",
.owner = THIS_MODULE,
@@ -116,7 +116,7 @@ static int __init i8042_platform_init(void)
if (!kbd_iobase)
return -ENODEV;
} else {
- int err = of_register_platform_driver(&sparc_i8042_driver);
+ int err = platform_driver_register(&sparc_i8042_driver);
if (err)
return err;
@@ -140,7 +140,7 @@ static inline void i8042_platform_exit(void)
struct device_node *root = of_find_node_by_path("/");
if (strcmp(root->name, "SUNW,JavaStation-1"))
- of_unregister_platform_driver(&sparc_i8042_driver);
+ platform_driver_unregister(&sparc_i8042_driver);
}
#else /* !CONFIG_PCI */