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
F151915859: D51857.id160285.diff
Sat, Apr 11, 12:35 PM
F151890213: D51857.id.diff
Sat, Apr 11, 9:32 AM
F151802408: D51857.id.diff
Fri, Apr 10, 6:50 PM
Unknown Object (File)
Fri, Apr 10, 7:54 AM
Unknown Object (File)
Fri, Apr 10, 1:20 AM
Unknown Object (File)
Tue, Apr 7, 11:38 PM
Unknown Object (File)
Tue, Apr 7, 4:10 AM
Unknown Object (File)
Mon, Mar 30, 12:02 PM
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 66153
Build 63036: arc lint + arc unit

Event Timeline

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

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
165

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.