mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
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>
This commit is contained in:
parent
1116575d91
commit
fa882867ae
2 changed files with 15 additions and 0 deletions
|
@ -461,6 +461,18 @@ void ipack_device_unregister(struct ipack_device *dev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ipack_device_unregister);
|
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)
|
static int __init ipack_init(void)
|
||||||
{
|
{
|
||||||
ida_init(&ipack_ida);
|
ida_init(&ipack_ida);
|
||||||
|
|
|
@ -221,6 +221,9 @@ void ipack_driver_unregister(struct ipack_driver *edrv);
|
||||||
int ipack_device_register(struct ipack_device *dev);
|
int ipack_device_register(struct ipack_device *dev);
|
||||||
void ipack_device_unregister(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
|
* DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table
|
||||||
* @_table: device table name
|
* @_table: device table name
|
||||||
|
|
Loading…
Reference in a new issue