Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317228
b: refs/heads/master
c: 42b3820
h: refs/heads/master
v: v3
  • Loading branch information
Samuel Iglesias Gonsalvez authored and Greg Kroah-Hartman committed Jun 7, 2012
1 parent df7c502 commit 6eb74d8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a23d32037073bbc818263ac26077a9981218a0d0
refs/heads/master: 42b38207c36890ead05ab1c0002714c48b9b996a
22 changes: 14 additions & 8 deletions trunk/drivers/staging/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
* Software Foundation; version 2 of the License.
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/device.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
Expand Down Expand Up @@ -116,7 +114,8 @@ static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty)
ipoctal = ipoctal_find_board(tty);

if (ipoctal == NULL) {
pr_err("Device not found. Major %d\n", tty->driver->major);
dev_err(tty->dev, "Device not found. Major %d\n",
tty->driver->major);
return -ENODEV;
}

Expand All @@ -136,7 +135,8 @@ static int ipoctal_open(struct tty_struct *tty, struct file *file)
ipoctal = ipoctal_find_board(tty);

if (ipoctal == NULL) {
pr_err("Device not found. Major %d\n", tty->driver->major);
dev_err(tty->dev, "Device not found. Major %d\n",
tty->driver->major);
return -ENODEV;
}

Expand Down Expand Up @@ -381,7 +381,9 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
res = ipoctal->dev->bus->ops->map_space(ipoctal->dev, 0,
IPACK_ID_SPACE);
if (res) {
pr_err("Unable to map slot [%d:%d] ID space!\n", bus_nr, slot);
dev_err(&ipoctal->dev->dev,
"Unable to map slot [%d:%d] ID space!\n",
bus_nr, slot);
return res;
}

Expand All @@ -396,14 +398,18 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
res = ipoctal->dev->bus->ops->map_space(ipoctal->dev, 0,
IPACK_IO_SPACE);
if (res) {
pr_err("Unable to map slot [%d:%d] IO space!\n", bus_nr, slot);
dev_err(&ipoctal->dev->dev,
"Unable to map slot [%d:%d] IO space!\n",
bus_nr, slot);
goto out_unregister_id_space;
}

res = ipoctal->dev->bus->ops->map_space(ipoctal->dev,
0x8000, IPACK_MEM_SPACE);
if (res) {
pr_err("Unable to map slot [%d:%d] MEM space!\n", bus_nr, slot);
dev_err(&ipoctal->dev->dev,
"Unable to map slot [%d:%d] MEM space!\n",
bus_nr, slot);
goto out_unregister_io_space;
}

Expand Down Expand Up @@ -472,7 +478,7 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
tty_set_operations(tty, &ipoctal_fops);
res = tty_register_driver(tty);
if (res) {
pr_err("Can't register tty driver.\n");
dev_err(&ipoctal->dev->dev, "Can't register tty driver.\n");
put_tty_driver(tty);
goto out_unregister_slot_unmap;
}
Expand Down

0 comments on commit 6eb74d8

Please sign in to comment.