ipack: add ipack_get_device() ipack_put_device()
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 8 Mar 2013 08:21:46 +0000 (09:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 19:23:09 +0000 (12:23 -0700)
Prepare everything for later use.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ipack/ipack.c
include/linux/ipack.h

index 7ec6b208b1cb11ff18ed1454662e616e410ef95f..4f913aa88971b590f8824ff7f7542ddf9ca3ab5d 100644 (file)
@@ -461,6 +461,18 @@ void ipack_device_unregister(struct ipack_device *dev)
 }
 EXPORT_SYMBOL_GPL(ipack_device_unregister);
 
+void ipack_get_device(struct ipack_device *dev)
+{
+       get_device(&dev->dev);
+}
+EXPORT_SYMBOL_GPL(ipack_get_device);
+
+void ipack_put_device(struct ipack_device *dev)
+{
+       put_device(&dev->dev);
+}
+EXPORT_SYMBOL_GPL(ipack_put_device);
+
 static int __init ipack_init(void)
 {
        ida_init(&ipack_ida);
index fea12cbb2aebc5019a4bd64a0212f421361c55a9..def91fd996f47727ab9a5725ce2271b852957384 100644 (file)
@@ -221,6 +221,9 @@ void ipack_driver_unregister(struct ipack_driver *edrv);
 int ipack_device_register(struct ipack_device *dev);
 void ipack_device_unregister(struct ipack_device *dev);
 
+void ipack_get_device(struct ipack_device *dev);
+void ipack_put_device(struct ipack_device *dev);
+
 /**
  * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table
  * @_table: device table name