Page MenuHomeFreeBSD

Fix incorrect dev being passed to gpiobus_detach_bus
ClosedPublic

Authored by devivanov_proton.me on Aug 10 2025, 5:04 PM.
Tags
None
Referenced Files
F146588984: D51857.id160166.diff
Tue, Mar 3, 9:49 PM
F146587672: D51857.id160166.diff
Tue, Mar 3, 9:34 PM
Unknown Object (File)
Mon, Mar 2, 5:46 PM
Unknown Object (File)
Mon, Mar 2, 5:19 PM
Unknown Object (File)
Sun, Mar 1, 4:22 PM
Unknown Object (File)
Sat, Feb 21, 1:38 PM
Unknown Object (File)
Jan 5 2026, 4:24 AM
Unknown Object (File)
Jan 5 2026, 4:24 AM
Subscribers

Details

Summary

Passing in the busdev will not detach from the bus correctly leaving the /dev/gpiocN entry

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 66176
Build 63059: arc lint + arc unit

Event Timeline

sys/dev/iicbus/gpio/pcf8574.c
160–161

Why test the busdev but detach dev

Remove check for busdev before detaching from gpiobus

This looks good to me, I'm adding a reviewer.

This revision is now accepted and ready to land.Aug 10 2025, 10:27 PM

So @jhb and @vexeduxr what do you think? From my tracing through of things, I think this is right, but I didn't do a super deep dive.

sys/dev/iicbus/gpio/pcf8574.c
163

Why add a newline?

devivanov_proton.me marked an inline comment as done.

Remove newline to confirm to the files format

This revision now requires review to proceed.Aug 11 2025, 6:16 PM
This revision is now accepted and ready to land.Aug 11 2025, 6:30 PM

@vexeduxr can you include this with the other gpiobus changes you're doing? Let me know if you need any help with committing someone else's change.

In D51857#1185208, @imp wrote:

@vexeduxr can you include this with the other gpiobus changes you're doing? Let me know if you need any help with committing someone else's change.

Sure.