[Linux-parport] [PATCH 01/16] pata_parport: add core driver (PARIDE replacement)

Christoph Hellwig hch at lst.de
Mon Mar 7 22:59:05 PST 2022


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



More information about the Linux-parport mailing list