Re: [PATCH] EISA bus update

From: Marc Zyngier
Date: Tue Aug 19 2003 - 15:26:43 EST


>>>>> "Greg" == Greg KH <greg@xxxxxxxxx> writes:

>> Well, there is nothing to do in this function, because that's what the
>> whole driver does: nothing. It just presents a range of IO ports to be
>> probed to the main EISA code, and nothing else.

Greg> But it exports something in sysfs, right? Any reason you just
Greg> don't dynamically create it? It's real hard to get static
Greg> allocation of struct device correct.

Indeed, it registers a platform device. On the dynamic vs static
subject, it shouldn't matter here. Could switch to dynamic allocation
if needed.

Greg> Will this code ever be able to be built as a module? If so,
Greg> this will not be correct.

No, it won't ever be a module. It woudn't make sense. Most of the time,
it is needed to boot the system...

>> Once it has registered as an EISA bus root, it doesn't get called
>> anymore, the core code does it all by itself.

Greg> So the release function never gets called at all then? Why
Greg> would this be needed at all?

The only case in which it is called is when registration to the EISA
framework fails (because there is no EISA mainboard, or some PCI/EISA
bridge has registered before, with the same IO range). Thus we call
plateform_device_unregister, which calls the release function. And
this only happens at init time. Never after.

Thanks,

M.
--
Places change, faces change. Life is so very strange.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/