> + > +static void pata_parport_dev_release(struct device *dev) > +{ > + struct pi_adapter *pi = container_of(dev, struct pi_adapter, dev); > + > + kfree(pi); > +} > > +void pata_parport_bus_release(struct device *dev) > +{ > + /* nothing to do here but required to avoid warning on device removal */ > +} > + > +static struct bus_type pata_parport_bus_type = { > + .name = DRV_NAME, > +}; > + > +static struct device pata_parport_bus = { > + .init_name = DRV_NAME, > + .release = pata_parport_bus_release, > +}; Hmm, wouldn't it make sense to let the libata device hang off the device in struct pardevice?