[RFC] Add .dts file for Netgear ReadyNAS 102

Willy Tarreau w at 1wt.eu
Thu Jul 4 02:15:30 EDT 2013


Hi Arnaud,

On Thu, Jul 04, 2013 at 12:58:10AM +0200, Arnaud Ebalard wrote:
> > Oh last important point, I found it in the 2.6.35.9-LSP-1.0.2_gw patch.
> > If someone finds a more recent one in a more recent kernel, it might be
> > worth comparing them.
> 
> The version in Netgear kernel (a 3.0.56, 25/Apr/2012 KW40 LSP release
> 3.1.0-NQ) is almost identical to the one in mirabox 2.6.35 kernel
> (24/Nov/2011, KW40 LSP release 1.0.2-NQ) if you remove the fixes for
> trailing spaces and tabs: 
> 
> 
> @@ -1618,7 +1618,9 @@
>  		ret = -ENXIO;
>  		goto fail_free_irq;
>  	}
> -	if (mtd_has_partitions()) {
> +
> +
> +#ifdef CONFIG_MTD_CMDLINE_PARTS
>  		if (mtd_has_cmdlinepart()) {
>  			static const char *probes[] = { "cmdlinepart", NULL };
>  			struct mtd_partition *parts;
> @@ -1627,12 +1629,11 @@
>  			nr_parts = parse_mtd_partitions(mtd, probes, &parts, 0);
>  
>  			if (nr_parts)
> -				return add_mtd_partitions(mtd, parts, nr_parts);
> +				return mtd_device_register(mtd, parts, nr_parts);
>  		}
> -		return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
> -	}
> -
> -	return add_mtd_device(mtd) == 1 ? -ENODEV : 0;
> +		return mtd_device_register(mtd, pdata->parts, pdata->nr_parts);
> +#endif
> +		return (mtd_device_register(mtd, pdata->parts, pdata->nr_parts));
>  
>  fail_free_irq:
>  	free_irq(IRQ_AURORA_NFC, info);
> @@ -1661,10 +1662,6 @@
>  
>  	platform_set_drvdata(pdev, NULL);
>  
> -	del_mtd_device(mtd);
> -#ifdef CONFIG_MTD_PARTITIONS
> -	del_mtd_partitions(mtd);
> -#endif
>  	free_irq(IRQ_AURORA_NFC, info);
>  	if (info->use_dma) {
>  		dma_free_writecombine(&pdev->dev, info->data_buff_size,
> @@ -1675,7 +1672,10 @@
>  	clk_disable(info->clk);
>  	clk_put(info->clk);
>  #endif
> -	kfree(mtd);
> +	if (mtd) {
> +		mtd_device_unregister(mtd);
> +		kfree(mtd);
> +	}
>  	return 0;
>  }
 
I had found a 3.5.x version somewhere (don't remember where, maybe an
ubuntu repository) which had the same changes. I had merged the last
hunk above, and other ones were not needed.

Thanks,
Willy




More information about the linux-arm-kernel mailing list