From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: backlight: apple_bl: Convert to a platform driver Date: Mon, 16 Mar 2026 11:59:44 +1000 Message-ID: In-Reply-To: <5084777.GXAFRqVoOG@rafael.j.wysocki> References: <5084777.GXAFRqVoOG@rafael.j.wysocki> <5084777.GXAFRqVoOG@rafael.j.wysocki> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Overall**: This is a correct and straightforward ACPI-to-platform driver = conversion. No functional issues found. **Positive observations:** 1. The `#include ` addition is correctly placed in= alphabetical order. 2. The function signatures are updated correctly: - `apple_bl_add(struct acpi_device *dev)` =E2=86=92 `apple_bl_probe(stru= ct platform_device *pdev)` =E2=80=94 the rename from `add` to `probe` follo= ws platform driver convention. - `apple_bl_remove(struct acpi_device *dev)` =E2=86=92 `apple_bl_remove(= struct platform_device *pdev)` =E2=80=94 the `void` return type matches `pl= atform_driver.remove` (line 241 of `platform_device.h`). 3. The driver struct conversion is correct: ```c static struct platform_driver apple_bl_driver =3D { .probe =3D apple_bl_probe, .remove =3D apple_bl_remove, .driver =3D { .name =3D "Apple backlight", .acpi_match_table =3D apple_bl_ids, }, }; ``` The `acpi_match_table` correctly replaces the old `.ids` field, keeping = the same `apple_bl_ids` array. 4. The init/exit functions correctly switch from `acpi_bus_register_driver`= /`acpi_bus_unregister_driver` to `platform_driver_register`/`platform_drive= r_unregister`. **Minor observation (not a bug):** - Neither the old `acpi_device *dev` parameter nor the new `platform_device= *pdev` parameter is actually used inside `apple_bl_probe()` or `apple_bl_r= emove()`. The driver relies entirely on global state (`hw_data`, `apple_bac= klight_device`). This is a pre-existing pattern and not something introduce= d by this patch, so it's fine to leave it as-is. However, a follow-up could= pass `&pdev->dev` to `backlight_device_register()` instead of `NULL` (line= 182-183), which would create a proper device hierarchy in sysfs. This is p= urely optional. - The `MODULE_DEVICE_TABLE(acpi, apple_bl_ids)` at line 242 is correctly re= tained, ensuring module autoloading still works. **Reviewed-by worthy**: Yes, this patch is correct and ready. --- Generated by Claude Code Patch Reviewer