Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32651
b: refs/heads/master
c: 2e8f7a3
h: refs/heads/master
i:
  32649: 43b0900
  32647: 73ef0b2
v: v3
  • Loading branch information
Jim Cromie authored and Linus Torvalds committed Jul 15, 2006
1 parent f96cc79 commit c5828b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 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: abecb6da704a71232a3103c8485c65ceb5fcd9dc
refs/heads/master: 2e8f7a3128bb8fac8351a994f1fc325717899308
13 changes: 6 additions & 7 deletions trunk/drivers/char/pc8736x_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static void pc8736x_gpio_change(unsigned index)
pc8736x_gpio_set(index, !pc8736x_gpio_current(index));
}

static struct nsc_gpio_ops pc8736x_access = {
static struct nsc_gpio_ops pc8736x_gpio_ops = {
.owner = THIS_MODULE,
.gpio_config = pc8736x_gpio_configure,
.gpio_dump = nsc_gpio_dump,
Expand All @@ -221,11 +221,12 @@ static struct nsc_gpio_ops pc8736x_access = {
.gpio_change = pc8736x_gpio_change,
.gpio_current = pc8736x_gpio_current
};
EXPORT_SYMBOL(pc8736x_gpio_ops);

static int pc8736x_gpio_open(struct inode *inode, struct file *file)
{
unsigned m = iminor(inode);
file->private_data = &pc8736x_access;
file->private_data = &pc8736x_gpio_ops;

dev_dbg(&pdev->dev, "open %d\n", m);

Expand All @@ -234,7 +235,7 @@ static int pc8736x_gpio_open(struct inode *inode, struct file *file)
return nonseekable_open(inode, file);
}

static const struct file_operations pc8736x_gpio_fops = {
static const struct file_operations pc8736x_gpio_fileops = {
.owner = THIS_MODULE,
.open = pc8736x_gpio_open,
.write = nsc_gpio_write,
Expand Down Expand Up @@ -276,7 +277,7 @@ static int __init pc8736x_gpio_init(void)
dev_err(&pdev->dev, "no device found\n");
goto undo_platform_dev_add;
}
pc8736x_access.dev = &pdev->dev;
pc8736x_gpio_ops.dev = &pdev->dev;

/* Verify that chip and it's GPIO unit are both enabled.
My BIOS does this, so I take minimum action here
Expand Down Expand Up @@ -326,7 +327,7 @@ static int __init pc8736x_gpio_init(void)
pc8736x_init_shadow();

/* ignore minor errs, and succeed */
cdev_init(&pc8736x_gpio_cdev, &pc8736x_gpio_fops);
cdev_init(&pc8736x_gpio_cdev, &pc8736x_gpio_fileops);
cdev_add(&pc8736x_gpio_cdev, devid, PC8736X_GPIO_CT);

return 0;
Expand All @@ -353,7 +354,5 @@ static void __exit pc8736x_gpio_cleanup(void)
platform_device_put(pdev);
}

EXPORT_SYMBOL(pc8736x_access);

module_init(pc8736x_gpio_init);
module_exit(pc8736x_gpio_cleanup);
12 changes: 6 additions & 6 deletions trunk/drivers/char/scx200_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ MODULE_PARM_DESC(major, "Major device number");

#define MAX_PINS 32 /* 64 later, when known ok */

struct nsc_gpio_ops scx200_access = {
struct nsc_gpio_ops scx200_gpio_ops = {
.owner = THIS_MODULE,
.gpio_config = scx200_gpio_configure,
.gpio_dump = nsc_gpio_dump,
Expand All @@ -44,12 +44,12 @@ struct nsc_gpio_ops scx200_access = {
.gpio_change = scx200_gpio_change,
.gpio_current = scx200_gpio_current
};
EXPORT_SYMBOL(scx200_access);
EXPORT_SYMBOL(scx200_gpio_ops);

static int scx200_gpio_open(struct inode *inode, struct file *file)
{
unsigned m = iminor(inode);
file->private_data = &scx200_access;
file->private_data = &scx200_gpio_ops;

if (m >= MAX_PINS)
return -EINVAL;
Expand All @@ -61,7 +61,7 @@ static int scx200_gpio_release(struct inode *inode, struct file *file)
return 0;
}

static const struct file_operations scx200_gpio_fops = {
static const struct file_operations scx200_gpio_fileops = {
.owner = THIS_MODULE,
.write = nsc_gpio_write,
.read = nsc_gpio_read,
Expand Down Expand Up @@ -91,7 +91,7 @@ static int __init scx200_gpio_init(void)
goto undo_malloc;

/* nsc_gpio uses dev_dbg(), so needs this */
scx200_access.dev = &pdev->dev;
scx200_gpio_ops.dev = &pdev->dev;

if (major) {
devid = MKDEV(major, 0);
Expand All @@ -105,7 +105,7 @@ static int __init scx200_gpio_init(void)
goto undo_platform_device_add;
}

cdev_init(&scx200_gpio_cdev, &scx200_gpio_fops);
cdev_init(&scx200_gpio_cdev, &scx200_gpio_fileops);
cdev_add(&scx200_gpio_cdev, devid, MAX_PINS);

return 0; /* succeed */
Expand Down

0 comments on commit c5828b9

Please sign in to comment.