Claude review: drm: rz-du: Ensure correct suspend/resume ordering with VSP

Claude Code Review Bot
2026-03-31T07:10:17Z

Patch Review

**Commit message:** Clear and well-written. Explains *why* the device link is needed (suspend/resume ordering), credits the original R-Car DU work, and includes the reference commit hash.

**Header changes (`rzg2l_du_vsp.h`):**
- Forward declaration of `struct device_link` added in correct alphabetical position.
- New `struct device_link *link` member added to `struct rzg2l_du_vsp` — correct placement alongside the existing `struct device *vsp`.

**Init path (`rzg2l_du_vsp_init`):**
```c
vsp->link = device_link_add(rcdu->dev, vsp->vsp, DL_FLAG_STATELESS);
```
- `rcdu->dev` (DU) is correctly the consumer, `vsp->vsp` is correctly the supplier.
- `DL_FLAG_STATELESS` is the right flag — it enforces suspend/resume ordering without managing the device lifecycle. This matches the R-Car DU driver.
- Error path returns `-EINVAL` with a dev_err message — appropriate.
- Placement after `drmm_add_action_or_reset()` and before `vsp1_du_init()` is correct: the cleanup action is already registered, so if `device_link_add` or `vsp1_du_init` fails, `rzg2l_du_vsp_cleanup` will be called and will properly delete the link (or skip if NULL).

**Cleanup path (`rzg2l_du_vsp_cleanup`):**
```c
if (vsp->link)
device_link_del(vsp->link);
```
- The NULL check is correct for the case where `device_link_add` failed (since cleanup is registered before the link is created).
- `device_link_del` before `put_device` is the right ordering.

**Include addition:** `<linux/device.h>` added in alphabetical order — correct.

**No issues.** The patch is a clean, minimal, well-motivated change that mirrors proven code from the R-Car DU driver.