Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile error. #15683

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,8 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port)
{
struct lpc17_40_i2cdev_s *priv;

irqstate_t flags;
uint32_t regval;

flags = spin_lock_irqsave(&priv->spinlock);

#ifdef CONFIG_LPC17_40_I2C0
if (port == 0)
{
Expand Down Expand Up @@ -621,13 +618,10 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port)
else
#endif
{
spin_unlock_irqrestore(&priv->spinlock, flags);
i2cerr("ERROR: LPC I2C Only supports ports 0, 1 and 2\n");
return NULL;
}

spin_unlock_irqrestore(&priv->spinlock, flags);

putreg32(I2C_CONSET_I2EN, priv->base + LPC17_40_I2C_CONSET_OFFSET);

/* Attach Interrupt Handler */
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/src/lpc43xx/lpc43_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,8 @@ struct i2c_master_s *lpc43_i2cbus_initialize(int port)
return NULL;
}

irqstate_t flags;
uint32_t regval;

flags = spin_lock_irqsave(&priv->spinlock);

#ifdef CONFIG_LPC43_I2C0
if (port == 0)
{
Expand Down Expand Up @@ -523,12 +520,9 @@ struct i2c_master_s *lpc43_i2cbus_initialize(int port)
else
#endif
{
spin_unlock_irqrestore(&priv->spinlock, flags);
return NULL;
}

spin_unlock_irqrestore(&priv->spinlock, flags);

putreg32(I2C_CONSET_I2EN, priv->base + LPC43_I2C_CONSET_OFFSET);

/* Attach Interrupt Handler */
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/src/lpc54xx/lpc54_i2c_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,13 +909,10 @@ static int lpc54_i2c_reset(struct i2c_master_s *dev)
struct i2c_master_s *lpc54_i2cbus_initialize(int port)
{
struct lpc54_i2cdev_s *priv;
irqstate_t flags;
uint32_t regval;

i2cinfo("port=%d\n", port);

flags = spin_lock_irqsave(&priv->spinlock);

/* Configure the requestin I2C peripheral */

/* NOTE: The basic FLEXCOMM initialization was performed in
Expand Down Expand Up @@ -1263,13 +1260,10 @@ struct i2c_master_s *lpc54_i2cbus_initialize(int port)
else
#endif
{
spin_unlock_irqrestore(&priv->spinlock, flags);
i2cerr("ERROR: Unsupported port=%d\n", port);
return NULL;
}

spin_unlock_irqrestore(&priv->spinlock, flags);

/* Install our operations */

priv->dev.ops = &lpc54_i2c_ops;
Expand Down
Loading