[RFC] Modifying i2c-core to support alias driver names compatible with device trees

Andreas Schwab schwab at suse.de
Thu Nov 8 21:03:04 EST 2007


Stephen Rothwell <sfr at canb.auug.org.au> writes:

> On Tue, 6 Nov 2007 15:39:42 -0500 "Jon Smirl" <jonsmirl at gmail.com> wrote:
>>
>> It was requested to split this code out into a separate thread....
>> 
>> This code modifies the i2c-core to support lists of alias names in the
>> chip drivers.
>> For example: .aliases	= (char const
>> *[]){"ricoh,rs5c372a","ricoh,rs5c372b","ricoh,rv5c386","ricoh,rv5c387a",
>> 0},
>
> You should not need the (char const *[]) casts at all.

It's not a cast, it's a compound literal.  What it does is to create an
anonymous object, the address of which is the initializer for the
aliases pointer.  Note that the anonymous object is not const qualified.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Linuxppc-dev mailing list