diff options
Diffstat (limited to 'include/linux/ipack.h')
| -rw-r--r-- | include/linux/ipack.h | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/include/linux/ipack.h b/include/linux/ipack.h index fea12cbb2aeb..1888e06ddf64 100644 --- a/include/linux/ipack.h +++ b/include/linux/ipack.h | |||
| @@ -207,19 +207,41 @@ int ipack_driver_register(struct ipack_driver *edrv, struct module *owner, | |||
| 207 | void ipack_driver_unregister(struct ipack_driver *edrv); | 207 | void ipack_driver_unregister(struct ipack_driver *edrv); |
| 208 | 208 | ||
| 209 | /** | 209 | /** |
| 210 | * ipack_device_register -- register an IPack device with the kernel | 210 | * ipack_device_init -- initialize an IPack device |
| 211 | * @dev: the new device to register. | 211 | * @dev: the new device to initialize. |
| 212 | * | 212 | * |
| 213 | * Register a new IPack device ("module" in IndustryPack jargon). The call | 213 | * Initialize a new IPack device ("module" in IndustryPack jargon). The call |
| 214 | * is done by the carrier driver. The carrier should populate the fields | 214 | * is done by the carrier driver. The carrier should populate the fields |
| 215 | * bus and slot as well as the region array of @dev prior to calling this | 215 | * bus and slot as well as the region array of @dev prior to calling this |
| 216 | * function. The rest of the fields will be allocated and populated | 216 | * function. The rest of the fields will be allocated and populated |
| 217 | * during registration. | 217 | * during initalization. |
| 218 | * | 218 | * |
| 219 | * Return zero on success or error code on failure. | 219 | * Return zero on success or error code on failure. |
| 220 | * | ||
| 221 | * NOTE: _Never_ directly free @dev after calling this function, even | ||
| 222 | * if it returned an error! Always use ipack_put_device() to give up the | ||
| 223 | * reference initialized in this function instead. | ||
| 224 | */ | ||
| 225 | int ipack_device_init(struct ipack_device *dev); | ||
| 226 | |||
| 227 | /** | ||
| 228 | * ipack_device_add -- Add an IPack device | ||
| 229 | * @dev: the new device to add. | ||
| 230 | * | ||
| 231 | * Add a new IPack device. The call is done by the carrier driver | ||
| 232 | * after calling ipack_device_init(). | ||
| 233 | * | ||
| 234 | * Return zero on success or error code on failure. | ||
| 235 | * | ||
| 236 | * NOTE: _Never_ directly free @dev after calling this function, even | ||
| 237 | * if it returned an error! Always use ipack_put_device() to give up the | ||
| 238 | * reference initialized in this function instead. | ||
| 220 | */ | 239 | */ |
| 221 | int ipack_device_register(struct ipack_device *dev); | 240 | int ipack_device_add(struct ipack_device *dev); |
| 222 | void ipack_device_unregister(struct ipack_device *dev); | 241 | void ipack_device_del(struct ipack_device *dev); |
| 242 | |||
| 243 | void ipack_get_device(struct ipack_device *dev); | ||
| 244 | void ipack_put_device(struct ipack_device *dev); | ||
| 223 | 245 | ||
| 224 | /** | 246 | /** |
| 225 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table | 247 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table |
