]> git.sur5r.net Git - u-boot/commit
spi: cf_spi: Use to_cf_spi_slave to resolve cfslave from slave
authorAxel Lin <axel.lin@ingics.com>
Fri, 20 Feb 2015 16:17:47 +0000 (00:17 +0800)
committerJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Sun, 29 Mar 2015 20:12:49 +0000 (01:42 +0530)
commitbb1662760eb0ec2eb88253cb95e2d423b2c2bb44
treedb48e3747b87ee8959134966506e70083fb560ff
parent46122960f0e7bac8cbb97bcccf8dc788c3a0beeb
spi: cf_spi: Use to_cf_spi_slave to resolve cfslave from slave

Don't assume slave is always the first member of struct cf_spi_slave.
Use container_of instead of casting first structure member.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
drivers/spi/cf_spi.c