Skip to content
Snippets Groups Projects
Commit d608ea59 authored by Federico Vaga's avatar Federico Vaga
Browse files

(incompatible) rename: __get_from_zobj to zio_get_from_obj


Signed-off-by: default avatarFederico Vaga <federico.vaga@gmail.com>
Acked-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent 033bec7d
Branches
Tags
No related merge requests found
...@@ -77,7 +77,7 @@ struct zio_obj_head { ...@@ -77,7 +77,7 @@ struct zio_obj_head {
* _zhead: zio_obj_header pointer * _zhead: zio_obj_header pointer
* member: which member return from the correspondent zio_object * member: which member return from the correspondent zio_object
*/ */
#define __get_from_zobj(_head, member) ({ \ #define zio_get_from_obj(_head, member) ({ \
typeof(to_zio_dev(&_head->dev)->member) (*el) = NULL; \ typeof(to_zio_dev(&_head->dev)->member) (*el) = NULL; \
switch (_head->zobj_type) { \ switch (_head->zobj_type) { \
case ZIO_DEV: \ case ZIO_DEV: \
......
...@@ -805,7 +805,7 @@ static void __zobj_enable(struct device *dev, unsigned int enable) ...@@ -805,7 +805,7 @@ static void __zobj_enable(struct device *dev, unsigned int enable)
pr_debug("%s\n", __func__); pr_debug("%s\n", __func__);
head = to_zio_head(dev); head = to_zio_head(dev);
flags = __get_from_zobj(to_zio_head(dev), flags); flags = zio_get_from_obj(to_zio_head(dev), flags);
status = !((*flags) & ZIO_STATUS); status = !((*flags) & ZIO_STATUS);
/* if the status is not changing */ /* if the status is not changing */
if (!(enable ^ status)) if (!(enable ^ status))
...@@ -919,7 +919,7 @@ static ssize_t zobj_show_enable(struct device *dev, ...@@ -919,7 +919,7 @@ static ssize_t zobj_show_enable(struct device *dev,
unsigned long *flags; unsigned long *flags;
int status; int status;
flags = __get_from_zobj(to_zio_head(dev), flags); flags = zio_get_from_obj(to_zio_head(dev), flags);
status = !(*flags & ZIO_DISABLED); status = !(*flags & ZIO_DISABLED);
return sprintf(buf, "%d\n", status); return sprintf(buf, "%d\n", status);
} }
...@@ -1349,7 +1349,7 @@ static int zattr_set_create(struct zio_obj_head *head, ...@@ -1349,7 +1349,7 @@ static int zattr_set_create(struct zio_obj_head *head,
struct attribute *attr; struct attribute *attr;
pr_debug("%s\n", __func__); pr_debug("%s\n", __func__);
zattr_set = __get_from_zobj(head, zattr_set); zattr_set = zio_get_from_obj(head, zattr_set);
if (!zattr_set) if (!zattr_set)
return -EINVAL; /* message already printed */ return -EINVAL; /* message already printed */
...@@ -1431,7 +1431,7 @@ static void zattr_set_remove(struct zio_obj_head *head) ...@@ -1431,7 +1431,7 @@ static void zattr_set_remove(struct zio_obj_head *head)
struct zio_attribute_set *zattr_set; struct zio_attribute_set *zattr_set;
int i; int i;
zattr_set = __get_from_zobj(head, zattr_set); zattr_set = zio_get_from_obj(head, zattr_set);
if (!zattr_set) if (!zattr_set)
return; return;
if (! head->dev.groups) if (! head->dev.groups)
......
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