提交 b2fda129 编写于 作者: A Axel Lin 提交者: Brian Norris

mtd: m25p80: Use positive logic to check JEDEC ID

For slightly better readability.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
上级 bd9c6e99
无相关合并请求
......@@ -1078,9 +1078,8 @@ static const struct spi_device_id *jedec_probe(struct spi_device *spi)
for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) {
info = (void *)m25p_ids[tmp].driver_data;
if (info->jedec_id == jedec) {
if (info->ext_id != 0 && info->ext_id != ext_jedec)
continue;
return &m25p_ids[tmp];
if (info->ext_id == 0 || info->ext_id == ext_jedec)
return &m25p_ids[tmp];
}
}
dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部