spi_ks8995: regs_size incorrect for some devices

Signed-off-by: Maarten Blomme <Maarten.Blomme@flir.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Blomme, Maarten 2017-03-02 13:08:49 +01:00 committed by David S. Miller
parent 4342696df7
commit 239870f2a0

View File

@ -491,8 +491,8 @@ static int ks8995_probe(struct spi_device *spi)
if (err)
return err;
ks->regs_attr.size = ks->chip->regs_size;
memcpy(&ks->regs_attr, &ks8995_registers_attr, sizeof(ks->regs_attr));
ks->regs_attr.size = ks->chip->regs_size;
err = ks8995_reset(ks);
if (err)