BigW Consortium Gitlab

Commit 81aba899 by David Frey

mt7697q: use to_spi_device instead of container_of

parent 01bc6bbd
......@@ -116,7 +116,7 @@ static int __init mt7697spi_init(void)
goto cleanup;
}
spi = container_of(dev, struct spi_device, dev);
spi = to_spi_device(dev);
if (!spi) {
dev_err(&master->dev, "%s(): get SPI device failed\n",
__func__);
......@@ -229,7 +229,7 @@ static void __exit mt7697spi_exit(void)
goto cleanup;
}
spi = container_of(dev, struct spi_device, dev);
spi = to_spi_device(dev);
if (!spi) {
dev_err(dev, "%s(): get SPI device failed\n",
__func__);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment