[PATCH v5] mtd: nand: tango: import driver for tango chips

Marc Gonzalez marc_gonzalez at sigmadesigns.com
Wed Sep 21 09:45:53 PDT 2016


On 19/09/2016 15:12, Marc Gonzalez wrote:

> +static int chip_init(struct device *dev, struct device_node *np, int kHz)
> +{
> +	int err;
> +	u32 cs, ecc_bits;
> +	struct nand_ecc_ctrl *ecc;
> +	struct tango_nfc *nfc = dev_get_drvdata(dev);
> +	struct tango_chip *p = devm_kzalloc(dev, sizeof(*p), GFP_KERNEL);

As pointed out by Boris on IRC, every chip needs a pointer back
to the parent device.

	p->chip.mtd.dev.parent = dev;

http://lxr.free-electrons.com/source/drivers/mtd/nand/sunxi_nand.c#L1729




More information about the linux-mtd mailing list