[parisc-linux] EISA EEPROM patch

Jochen Friedrich jochen@scram.de
Mon, 25 Feb 2002 20:05:32 +0100 (CET)


Hi there,

looks like there is a typo in eisa_eeprom.c. Probably HPEE_BASE_LENG 
should be HPEE_MAX_LENGTH instead?

ebru:/usr/src/linux/drivers/gsc# cvs diff -u eisa_eeprom.c
Index: eisa_eeprom.c
===================================================================
RCS file: /var/cvs/linux/drivers/gsc/eisa_eeprom.c,v
retrieving revision 1.1
diff -u -r1.1 eisa_eeprom.c
--- eisa_eeprom.c       2002/02/24 16:29:43     1.1
+++ eisa_eeprom.c       2002/02/25 19:01:26
@@ -22,10 +22,10 @@
                offset += file->f_pos;
                break;
          case 2:
-               offset += HPEE_BASE_LENG;
+               offset += HPEE_MAX_LENGTH;
                break;
        }
-       return (offset >= 0 && offset < HPEE_BASE_LENG) ? (file->f_pos = offset) : -EINVAL;
+       return (offset >= 0 && offset < HPEE_MAX_LENGTH) ? (file->f_pos = offset) : -EINVAL;
 }

 static ssize_t eisa_eeprom_read(struct file * file,
@@ -35,10 +35,10 @@
        ssize_t ret;
        int i;

-       if (*ppos >= HPEE_BASE_LENG)
+       if (*ppos >= HPEE_MAX_LENGTH)
                return 0;

-       count = *ppos + count < HPEE_BASE_LENG ? count : HPEE_BASE_LENG - *ppos;
+       count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos;
        tmp = kmalloc(count, GFP_KERNEL);
        if (tmp) {
                for (i = 0; i < count; i++)

Cheers,
--jochen