diff options
author | Tony Jones <tonyj@suse.de> | 2007-09-24 20:03:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:06 -0500 |
commit | 0c55445f201841bfd6c658c47df8311b6722f002 (patch) | |
tree | 68b02474461eea74e0fd54c5858a433b6aa942ab /drivers/mfd/ucb1x00-core.c | |
parent | 68db2bc98cc1594a1cc487755aff4340fd4f1611 (diff) |
MCP_UCB1200: Convert from class_device to device
struct class_device is going away, this converts the code to use struct
device instead.
Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/mfd/ucb1x00-core.c')
-rw-r--r-- | drivers/mfd/ucb1x00-core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index e03f1bcd4f9f..f6b10dda31fd 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c | |||
@@ -458,7 +458,7 @@ static int ucb1x00_detect_irq(struct ucb1x00 *ucb) | |||
458 | return probe_irq_off(mask); | 458 | return probe_irq_off(mask); |
459 | } | 459 | } |
460 | 460 | ||
461 | static void ucb1x00_release(struct class_device *dev) | 461 | static void ucb1x00_release(struct device *dev) |
462 | { | 462 | { |
463 | struct ucb1x00 *ucb = classdev_to_ucb1x00(dev); | 463 | struct ucb1x00 *ucb = classdev_to_ucb1x00(dev); |
464 | kfree(ucb); | 464 | kfree(ucb); |
@@ -466,7 +466,7 @@ static void ucb1x00_release(struct class_device *dev) | |||
466 | 466 | ||
467 | static struct class ucb1x00_class = { | 467 | static struct class ucb1x00_class = { |
468 | .name = "ucb1x00", | 468 | .name = "ucb1x00", |
469 | .release = ucb1x00_release, | 469 | .dev_release = ucb1x00_release, |
470 | }; | 470 | }; |
471 | 471 | ||
472 | static int ucb1x00_probe(struct mcp *mcp) | 472 | static int ucb1x00_probe(struct mcp *mcp) |
@@ -490,9 +490,9 @@ static int ucb1x00_probe(struct mcp *mcp) | |||
490 | goto err_disable; | 490 | goto err_disable; |
491 | 491 | ||
492 | 492 | ||
493 | ucb->cdev.class = &ucb1x00_class; | 493 | ucb->dev.class = &ucb1x00_class; |
494 | ucb->cdev.dev = &mcp->attached_device; | 494 | ucb->dev.parent = &mcp->attached_device; |
495 | strlcpy(ucb->cdev.class_id, "ucb1x00", sizeof(ucb->cdev.class_id)); | 495 | strlcpy(ucb->dev.bus_id, "ucb1x00", sizeof(ucb->dev.bus_id)); |
496 | 496 | ||
497 | spin_lock_init(&ucb->lock); | 497 | spin_lock_init(&ucb->lock); |
498 | spin_lock_init(&ucb->io_lock); | 498 | spin_lock_init(&ucb->io_lock); |
@@ -517,7 +517,7 @@ static int ucb1x00_probe(struct mcp *mcp) | |||
517 | 517 | ||
518 | mcp_set_drvdata(mcp, ucb); | 518 | mcp_set_drvdata(mcp, ucb); |
519 | 519 | ||
520 | ret = class_device_register(&ucb->cdev); | 520 | ret = device_register(&ucb->dev); |
521 | if (ret) | 521 | if (ret) |
522 | goto err_irq; | 522 | goto err_irq; |
523 | 523 | ||
@@ -554,7 +554,7 @@ static void ucb1x00_remove(struct mcp *mcp) | |||
554 | mutex_unlock(&ucb1x00_mutex); | 554 | mutex_unlock(&ucb1x00_mutex); |
555 | 555 | ||
556 | free_irq(ucb->irq, ucb); | 556 | free_irq(ucb->irq, ucb); |
557 | class_device_unregister(&ucb->cdev); | 557 | device_unregister(&ucb->dev); |
558 | } | 558 | } |
559 | 559 | ||
560 | int ucb1x00_register_driver(struct ucb1x00_driver *drv) | 560 | int ucb1x00_register_driver(struct ucb1x00_driver *drv) |