printk(KERN_ERR "SMU: Can't find doorbell GPIO !\n");
goto fail;
}
- data = get_property(np, "reg", NULL);
- data = (u32 *)get_property(smu->db_node, "reg", NULL);
++ data = get_property(smu->db_node, "reg", NULL);
if (data == NULL) {
- of_node_put(np);
+ of_node_put(smu->db_node);
+ smu->db_node = NULL;
printk(KERN_ERR "SMU: Can't find doorbell GPIO address !\n");
goto fail;
}
/* Now look for the smu-interrupt GPIO */
do {
- np = of_find_node_by_name(NULL, "smu-interrupt");
- if (np == NULL)
+ smu->msg_node = of_find_node_by_name(NULL, "smu-interrupt");
+ if (smu->msg_node == NULL)
break;
- data = get_property(np, "reg", NULL);
- data = (u32 *)get_property(smu->msg_node, "reg", NULL);
++ data = get_property(smu->msg_node, "reg", NULL);
if (data == NULL) {
- of_node_put(np);
+ of_node_put(smu->msg_node);
+ smu->msg_node = NULL;
break;
}
smu->msg = *data;