Commit 3f52809f authored by Federico Vaga's avatar Federico Vaga Committed by Alessandro Rubini

to_zio_buf and to_zio_trig: bugfix

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 52ddaee7
......@@ -138,7 +138,7 @@ struct zio_buffer_type {
struct zio_device *zdev_owner;
unsigned int n_zdev_owner;
};
#define to_zio_buf(obj) container_of(obj, struct zio_buffer, head.kobj)
#define to_zio_buf(ptr) container_of(ptr, struct zio_buffer_type, head.kobj)
/* read and write may often be the generic ones */
ssize_t zio_generic_read(struct file *, char __user *,
......
......@@ -26,7 +26,7 @@ struct zio_trigger_type {
struct zio_device *zdev_owner;
unsigned int n_zdev_owner;
};
#define to_zio_trig(_kobj) container_of(_kobj, struct zio_trigger, head.kobj)
#define to_zio_trig(ptr) container_of(ptr, struct zio_trigger_type, head.kobj)
int __must_check zio_register_trig(struct zio_trigger_type *ztrig,
const char *name);
......
......@@ -395,10 +395,10 @@ static struct zio_attribute_set *__get_zattr_set(struct zio_obj_head *head)
zattr_set = &to_zio_chan(&head->kobj)->zattr_set;
break;
case ZTRIG:
zattr_set = &to_zio_chan(&head->kobj)->zattr_set;
zattr_set = &to_zio_trig(&head->kobj)->zattr_set;
break;
case ZBUF:
zattr_set = &to_zio_chan(&head->kobj)->zattr_set;
zattr_set = &to_zio_buf(&head->kobj)->zattr_set;
break;
case ZTI:
zattr_set = &to_zio_ti(&head->kobj)->zattr_set;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment