Re: [PATCH 01/16] pata_parport: add core driver (PARIDE replacement)

Christoph Hellwig
2022-03-08T06:59:13Z

> +
> +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?