[PATCH 5/8] staging: vme: add functions for bridge module refcounting

Manohar Vanga manohar.vanga at cern.ch
Wed Aug 10 06:52:54 UTC 2011


Hey Emilio,

> This works as long as all devices are tied to the driver
> loading; i.e. when the devices can only be removed when the
> driver is removed.  A device might go away while the driver
> still manages other devices of the same kin; this is why
> particular drivers explicitly manage the get/put in
> .probe/.release.

I have still left the exports for the refcounting functions
intact so border case drivers are free to use these explicitly
(albeit on top of the automatic refcounting in .probe and
.remove).

> In vme we may one day have hotplug (VME64x supports it IIRC),
> but we're not quite there yet. One can remove devices from
> sysfs anytime though.

Won't this event trigger the .remove function? If it does, it
shouldn't be a problem.

> I still think the original patch is the sane way to go.

I think this approach is a good middle ground between both
arguments. If we really run into major issues with this
(which I somewhat doubt will happen), we can always fix
things up. It's not immutable!

Thanks!

--
/manohar



More information about the devel mailing list