Commit fb1a0ef4 authored by Alessandro Rubini's avatar Alessandro Rubini

FMC: remove unused and misleading conditionals

At registration and unregistration time, I was checking fmc->flags
for FMC_DEVICE_NO_MEZZANINE, to skip initialization and cleanup for
empty slots.  But the check was wrong (see previous commit) and
the conditional was never triggered.

I think we should register slots with no mezzanines, because the
carrier may offer some support anyways (the SPEC does), so the commit
removes the conditionals instead of fixing them.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent cc9e0db0
......@@ -189,9 +189,6 @@ int fmc_device_register_n(struct fmc_device **devs, int n)
for (i = 0; i < n; i++) {
fmc = devarray[i];
if (fmc->flags == FMC_DEVICE_NO_MEZZANINE)
continue; /* dev_info already done above */
fmc->nr_slots = n; /* each slot must know how many are there */
fmc->devarray = devarray;
......@@ -263,8 +260,6 @@ void fmc_device_unregister_n(struct fmc_device **devs, int n)
kfree(devs[0]->devarray);
for (i = 0; i < n; i++) {
if (devs[i]->flags == FMC_DEVICE_NO_MEZZANINE)
continue;
sysfs_remove_bin_file(&devs[i]->dev.kobj, &fmc_eeprom_attr);
device_del(&devs[i]->dev);
fmc_free_id_info(devs[i]);
......
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