andrzej-kaczmarek commented on a change in pull request #1550: spiflash bus 
driver support
URL: https://github.com/apache/mynewt-core/pull/1550#discussion_r243068618
 
 

 ##########
 File path: hw/drivers/flash/spiflash/src/spiflash.c
 ##########
 @@ -644,11 +662,15 @@ spiflash_power_down(struct spiflash_dev *dev)
 
     spiflash_lock(dev);
 
+#if MYNEWT_VAL(BUS_DRIVER_PRESENT)
+    bus_node_simple_write(&dev->dev.bnode.odev, cmd, sizeof(cmd));
 
 Review comment:
   use `(struct os_dev *)&dev->dev` - code outside bus driver should not access 
contents of bus node object and they are defined in a way that such cast is 
always possible by design

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to