diff options
author | Samuel Iglesias Gonsalvez <siglesias@igalia.com> | 2013-03-08 03:21:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 15:23:09 -0400 |
commit | fa882867ae5f8543eb304a1667563f1c99514475 (patch) | |
tree | 09708f13145ee8eb65cfc3f191644bb89154e387 | |
parent | 1116575d918a7d5fe6d1adf46c5bbdf11dcec51b (diff) |
ipack: add ipack_get_device() ipack_put_device()
Prepare everything for later use.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/ipack/ipack.c | 12 | ||||
-rw-r--r-- | include/linux/ipack.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c index 7ec6b208b1cb..4f913aa88971 100644 --- a/drivers/ipack/ipack.c +++ b/drivers/ipack/ipack.c | |||
@@ -461,6 +461,18 @@ void ipack_device_unregister(struct ipack_device *dev) | |||
461 | } | 461 | } |
462 | EXPORT_SYMBOL_GPL(ipack_device_unregister); | 462 | EXPORT_SYMBOL_GPL(ipack_device_unregister); |
463 | 463 | ||
464 | void ipack_get_device(struct ipack_device *dev) | ||
465 | { | ||
466 | get_device(&dev->dev); | ||
467 | } | ||
468 | EXPORT_SYMBOL_GPL(ipack_get_device); | ||
469 | |||
470 | void ipack_put_device(struct ipack_device *dev) | ||
471 | { | ||
472 | put_device(&dev->dev); | ||
473 | } | ||
474 | EXPORT_SYMBOL_GPL(ipack_put_device); | ||
475 | |||
464 | static int __init ipack_init(void) | 476 | static int __init ipack_init(void) |
465 | { | 477 | { |
466 | ida_init(&ipack_ida); | 478 | ida_init(&ipack_ida); |
diff --git a/include/linux/ipack.h b/include/linux/ipack.h index fea12cbb2aeb..def91fd996f4 100644 --- a/include/linux/ipack.h +++ b/include/linux/ipack.h | |||
@@ -221,6 +221,9 @@ void ipack_driver_unregister(struct ipack_driver *edrv); | |||
221 | int ipack_device_register(struct ipack_device *dev); | 221 | int ipack_device_register(struct ipack_device *dev); |
222 | void ipack_device_unregister(struct ipack_device *dev); | 222 | void ipack_device_unregister(struct ipack_device *dev); |
223 | 223 | ||
224 | void ipack_get_device(struct ipack_device *dev); | ||
225 | void ipack_put_device(struct ipack_device *dev); | ||
226 | |||
224 | /** | 227 | /** |
225 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table | 228 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table |
226 | * @_table: device table name | 229 | * @_table: device table name |