diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-01 23:20:20 +0000 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-01 23:20:20 +0000 |
| commit | 8d3c3ddfa85837e24fad6fa39318617cbb59e843 (patch) | |
| tree | f699dcaac2a11f0c9506ad111ae39fd5e3617c2d /drivers/rapidio/rio-sysfs.c | |
| parent | e8b2c3c47a53348aebbbeb5322e32937df958793 (diff) | |
| parent | 6927faf30920b8c03dfa007e732642a1f1f20089 (diff) | |
Merge branch 'drm-intel-fixes' into drm-intel-next
Diffstat (limited to 'drivers/rapidio/rio-sysfs.c')
| -rw-r--r-- | drivers/rapidio/rio-sysfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c index 76b41853a877..1269fbd2deca 100644 --- a/drivers/rapidio/rio-sysfs.c +++ b/drivers/rapidio/rio-sysfs.c @@ -77,9 +77,9 @@ rio_read_config(struct file *filp, struct kobject *kobj, /* Several chips lock up trying to read undefined config space */ if (capable(CAP_SYS_ADMIN)) - size = 0x200000; + size = RIO_MAINT_SPACE_SZ; - if (off > size) + if (off >= size) return 0; if (off + count > size) { size -= off; @@ -147,10 +147,10 @@ rio_write_config(struct file *filp, struct kobject *kobj, loff_t init_off = off; u8 *data = (u8 *) buf; - if (off > 0x200000) + if (off >= RIO_MAINT_SPACE_SZ) return 0; - if (off + count > 0x200000) { - size = 0x200000 - off; + if (off + count > RIO_MAINT_SPACE_SZ) { + size = RIO_MAINT_SPACE_SZ - off; count = size; } @@ -200,7 +200,7 @@ static struct bin_attribute rio_config_attr = { .name = "config", .mode = S_IRUGO | S_IWUSR, }, - .size = 0x200000, + .size = RIO_MAINT_SPACE_SZ, .read = rio_read_config, .write = rio_write_config, }; |
