[PATCH] pcmcia: allow one port excludes
Allow for excluding only one port in /etc/pcmcia/config.otps Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
parent
664cceb009
commit
1146bc743e
1 changed files with 4 additions and 4 deletions
|
@ -691,7 +691,7 @@ static int adjust_memory(struct pcmcia_socket *s, unsigned int action, unsigned
|
||||||
unsigned long size = end - start + 1;
|
unsigned long size = end - start + 1;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (end <= start)
|
if (end < start)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
down(&rsrc_sem);
|
down(&rsrc_sem);
|
||||||
|
@ -724,7 +724,7 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long
|
||||||
unsigned long size = end - start + 1;
|
unsigned long size = end - start + 1;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (end <= start)
|
if (end < start)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (end > IO_SPACE_LIMIT)
|
if (end > IO_SPACE_LIMIT)
|
||||||
|
@ -925,7 +925,7 @@ static ssize_t store_io_db(struct class_device *class_dev, const char *buf, size
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (end_addr <= start_addr)
|
if (end_addr < start_addr)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ret = adjust_io(s, add, start_addr, end_addr);
|
ret = adjust_io(s, add, start_addr, end_addr);
|
||||||
|
@ -977,7 +977,7 @@ static ssize_t store_mem_db(struct class_device *class_dev, const char *buf, siz
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (end_addr <= start_addr)
|
if (end_addr < start_addr)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ret = adjust_memory(s, add, start_addr, end_addr);
|
ret = adjust_memory(s, add, start_addr, end_addr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue