Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Samuel Iglesias Gonsalvez and committed by
Greg Kroah-Hartman
fa882867 1116575d

+15
+12
drivers/ipack/ipack.c
··· 461 461 } 462 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 476 static int __init ipack_init(void) 465 477 { 466 478 ida_init(&ipack_ida);
+3
include/linux/ipack.h
··· 221 221 int ipack_device_register(struct ipack_device *dev); 222 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 228 * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table 226 229 * @_table: device table name