[PATCH 12/12] mtd: nand: provision full ID support
Huang Shijie
shijie8 at gmail.com
Tue Mar 5 09:36:02 EST 2013
On Tue, Mar 5, 2013 at 6:42 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Tue, 2013-03-05 at 14:08 +0800, Huang Shijie wrote:
>> > struct nand_flash_dev {
>> > char *name;
>> > - int dev_id;
>> > + union {
>> > + struct {
>> > + uint8_t mfr_id;
>> > + uint8_t dev_id;
>> > + };
>> > + uint8_t id[8];
>> > + };
>> >
>> We can add a new helper like compare_nand_with_devid() to remove the
>> mfr_id and dev_id, only left the id[8].
>
> Huang, did you miss the "union { ... }" part or you think using 'id[N]'
> directly is readable enough?
i think using the id[] is enough.
the union is redundant.
thanks
Huang Shijie
More information about the linux-mtd
mailing list