Commit graph

7 commits

Author SHA1 Message Date
Federico Vaga
36c53b3cc3 ipack: save carrier owner to allow device to get it
There was not any kind of protection against carrier driver removal.
In this way, device driver can 'get' the carrier driver when it is
using it.

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:13:13 -07:00
Greg Kroah-Hartman
5152a5098c ipack: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the ipack bus code to use the
correct field.

Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Cc: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: <industrypack-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:40:57 -07:00
Samuel Iglesias Gonsalvez
e926301b39 ipack: split ipack_device_register() in several functions
One function is ipack_device_init(). If it fails, the caller should execute
ipack_put_device().

The second function is ipack_device_add that only adds the device. If
it fails, the caller should execute ipack_put_device().

Then the device is removed with refcount = 0, as device_register() kernel
documentation says.

ipack_device_del() is added to remove the device.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15 12:23:09 -07:00
Samuel Iglesias Gonsalvez
fa882867ae 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>
2013-03-15 12:23:09 -07:00
Samuel Iglesias Gonsalvez
27cf2d1b87 ipack: remove ipack_ids.h file
Its contents are merged into ipack.h. So this file is not needed.

Doing that, it simplifies the ipack-related driver development.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16 11:29:35 -08:00
Samuel Iglesias Gonsalvez
7dbce021a6 ipack: move header files to include/linux
Move ipack header files to include/linux/ directory where they belong.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16 11:29:35 -08:00
Greg Kroah-Hartman
05e5027efc Staging: ipack: move out of staging
The ipack subsystem is cleaned up enough to now move out of the staging
tree, and into drivers/ipack.

Cc: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Cc: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16 08:14:18 -08:00
Renamed from drivers/staging/ipack/ipack.c (Browse further)