move device_type definition from sysfs.c to objects.c

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
object.c: move releasing code in dev_type->release() operation

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
object.c: put_device() after zio_device_find_child()

The function zio_device_find_child() internally use the Linux kernel
function device_find_child() with increment the refcount of the child
device.
Once we have done our operation on the child device we must use
put_device() to decrese the refcount.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
object.c: replace __ti_{create_and_init|register} with __ti_create()

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
object.c: replace __bi_{create_and_init|register} with __bi_create()

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Use device_type->release() to release zio object resources. Simplify
trigger and buffer creation