Skip to content

Commit

Permalink
ipack: add ipack_get_device() ipack_put_device()
Browse files Browse the repository at this point in the history
Prepare everything for later use.

Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
samuelig authored and gregkh committed Mar 15, 2013
1 parent 1116575 commit fa88286
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/ipack/ipack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions include/linux/ipack.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa88286

Please sign in to comment.