X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fchar%2Fbriq_panel.c;h=ed53f541d9e8a90e2aa4d06cd4952a1372512013;hb=d3f9882cca84a7cb67a19bbc597356b49896b8c2;hp=b8c22255f6ada92615b2e70d8ad717927e04c9ae;hpb=cdb8355add9b1d87ecfcb58b12879897dc1e3e36;p=powerpc.git diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c index b8c22255f6..ed53f541d9 100644 --- a/drivers/char/briq_panel.c +++ b/drivers/char/briq_panel.c @@ -8,10 +8,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -188,7 +186,7 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_ return len; } -static struct file_operations briq_panel_fops = { +static const struct file_operations briq_panel_fops = { .owner = THIS_MODULE, .read = briq_panel_read, .write = briq_panel_write, @@ -204,13 +202,16 @@ static struct miscdevice briq_panel_miscdev = { static int __init briq_panel_init(void) { - struct device_node *root = find_path_device("/"); + struct device_node *root = of_find_node_by_path("/"); const char *machine; int i; - machine = get_property(root, "model", NULL); - if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) + machine = of_get_property(root, "model", NULL); + if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) { + of_node_put(root); return -ENODEV; + } + of_node_put(root); printk(KERN_INFO "briq_panel: v%s Dr. Karsten Jeppesen (kj@totalimpact.com)\n",