xilinx_ps2.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) xilinx_ps2.c (32237677fb6a15f08aadfe2bb4129b2de7e7caab)
1/*
2 * Xilinx XPS PS/2 device driver
3 *
4 * (c) 2005 MontaVista Software, Inc.
5 * (c) 2008 Xilinx, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 229 unchanged lines hidden (view full) ---

238 struct resource r_mem; /* IO mem resources */
239 struct xps2data *drvdata;
240 struct serio *serio;
241 struct device *dev = &ofdev->dev;
242 resource_size_t remap_size, phys_addr;
243 unsigned int irq;
244 int error;
245
1/*
2 * Xilinx XPS PS/2 device driver
3 *
4 * (c) 2005 MontaVista Software, Inc.
5 * (c) 2008 Xilinx, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 229 unchanged lines hidden (view full) ---

238 struct resource r_mem; /* IO mem resources */
239 struct xps2data *drvdata;
240 struct serio *serio;
241 struct device *dev = &ofdev->dev;
242 resource_size_t remap_size, phys_addr;
243 unsigned int irq;
244 int error;
245
246 dev_info(dev, "Device Tree Probing \'%s\'\n",
247 ofdev->dev.of_node->name);
246 dev_info(dev, "Device Tree Probing \'%s\'\n", dev->of_node->name);
248
249 /* Get iospace for the device */
247
248 /* Get iospace for the device */
250 error = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem);
249 error = of_address_to_resource(dev->of_node, 0, &r_mem);
251 if (error) {
252 dev_err(dev, "invalid address\n");
253 return error;
254 }
255
256 /* Get IRQ for the device */
250 if (error) {
251 dev_err(dev, "invalid address\n");
252 return error;
253 }
254
255 /* Get IRQ for the device */
257 irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
256 irq = irq_of_parse_and_map(dev->of_node, 0);
258 if (!irq) {
259 dev_err(dev, "no IRQ found\n");
260 return -ENODEV;
261 }
262
263 drvdata = kzalloc(sizeof(struct xps2data), GFP_KERNEL);
264 serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
265 if (!drvdata || !serio) {

--- 111 unchanged lines hidden ---
257 if (!irq) {
258 dev_err(dev, "no IRQ found\n");
259 return -ENODEV;
260 }
261
262 drvdata = kzalloc(sizeof(struct xps2data), GFP_KERNEL);
263 serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
264 if (!drvdata || !serio) {

--- 111 unchanged lines hidden ---