mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
usb: dwc3: google: Use FIELD_MODIFY()
Use FIELD_MODIFY() to remove open-coded bit manipulation. No functional change intended. Signed-off-by: Hans Zhang <18255117159@163.com> Link: https://patch.msgid.link/20260430163919.47372-3-18255117159@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6dea5fcffb
commit
dd9bb349a0
|
|
@ -104,9 +104,8 @@ static int dwc3_google_set_pmu_state(struct dwc3_google *google, int state)
|
|||
regmap_read(google->usb_cfg_regmap,
|
||||
google->host_cfg_offset + HOST_CFG1_OFFSET, ®);
|
||||
|
||||
reg &= ~HOST_CFG1_PM_POWER_STATE_REQUEST;
|
||||
reg |= (FIELD_PREP(HOST_CFG1_PM_POWER_STATE_REQUEST, state) |
|
||||
HOST_CFG1_PME_EN);
|
||||
FIELD_MODIFY(HOST_CFG1_PM_POWER_STATE_REQUEST, ®, state);
|
||||
reg |= HOST_CFG1_PME_EN;
|
||||
regmap_write(google->usb_cfg_regmap,
|
||||
google->host_cfg_offset + HOST_CFG1_OFFSET, reg);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user