xiaoxiang781216 commented on code in PR #7472:
URL: https://github.com/apache/incubator-nuttx/pull/7472#discussion_r1011144704


##########
arch/arm/src/sam34/sam_twi.c:
##########
@@ -917,12 +934,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus)
 #ifdef CONFIG_SAM34_TWIM1
   if (bus == 1)
     {
-      /* Set up TWI1 register base address and IRQ number */
-
-      priv       = &g_twi1;
-      priv->base = SAM_TWI1_BASE;
-      priv->irq  = SAM_IRQ_TWI1;
-      priv->twi  = 1;
+      priv = &g_twi1;

Review Comment:
   Yes, since the initial value is set at definition place.



##########
arch/arm/src/sam34/sam_twi.c:
##########
@@ -946,15 +958,6 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus)
       return NULL;
     }
 
-  /* Initialize the device structure */
-
-  priv->dev.ops = &g_twiops;

Review Comment:
   Yes, since the initial value is set at definition place.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to