Commit 24c15496 authored by Ben Hutchings's avatar Ben Hutchings Committed by David Woodhouse

mtd: Remove unnecessary comparisons with MAX_MTD_DEVICES

MAX_MTD_DEVICES is about to be removed.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent e99e90ae
...@@ -668,7 +668,7 @@ static int __init init_pmc551(void) ...@@ -668,7 +668,7 @@ static int __init init_pmc551(void)
{ {
struct pci_dev *PCI_Device = NULL; struct pci_dev *PCI_Device = NULL;
struct mypriv *priv; struct mypriv *priv;
int count, found = 0; int found = 0;
struct mtd_info *mtd; struct mtd_info *mtd;
u32 length = 0; u32 length = 0;
...@@ -695,7 +695,7 @@ static int __init init_pmc551(void) ...@@ -695,7 +695,7 @@ static int __init init_pmc551(void)
/* /*
* PCU-bus chipset probe. * PCU-bus chipset probe.
*/ */
for (count = 0; count < MAX_MTD_DEVICES; count++) { for (;;) {
if ((PCI_Device = pci_get_device(PCI_VENDOR_ID_V3_SEMI, if ((PCI_Device = pci_get_device(PCI_VENDOR_ID_V3_SEMI,
PCI_DEVICE_ID_V3_SEMI_V370PDC, PCI_DEVICE_ID_V3_SEMI_V370PDC,
......
...@@ -67,9 +67,6 @@ static int mtd_open(struct inode *inode, struct file *file) ...@@ -67,9 +67,6 @@ static int mtd_open(struct inode *inode, struct file *file)
DEBUG(MTD_DEBUG_LEVEL0, "MTD_open\n"); DEBUG(MTD_DEBUG_LEVEL0, "MTD_open\n");
if (devnum >= MAX_MTD_DEVICES)
return -ENODEV;
/* You can't open the RO devices RW */ /* You can't open the RO devices RW */
if ((file->f_mode & FMODE_WRITE) && (minor & 1)) if ((file->f_mode & FMODE_WRITE) && (minor & 1))
return -EACCES; return -EACCES;
......
...@@ -429,11 +429,6 @@ static int __init mtdoops_init(void) ...@@ -429,11 +429,6 @@ static int __init mtdoops_init(void)
mtd_index = simple_strtoul(mtddev, &endp, 0); mtd_index = simple_strtoul(mtddev, &endp, 0);
if (*endp == '\0') if (*endp == '\0')
cxt->mtd_index = mtd_index; cxt->mtd_index = mtd_index;
if (cxt->mtd_index > MAX_MTD_DEVICES) {
printk(KERN_ERR "mtdoops: invalid mtd device number (%u) given\n",
mtd_index);
return -EINVAL;
}
cxt->oops_buf = vmalloc(record_size); cxt->oops_buf = vmalloc(record_size);
if (!cxt->oops_buf) { if (!cxt->oops_buf) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment