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
F132571688: D51857.diff
Sat, Oct 18, 2:02 AM
Unknown Object (File)
Sat, Oct 11, 2:09 PM
Unknown Object (File)
Sat, Oct 11, 2:09 PM
Unknown Object (File)
Sat, Oct 11, 2:09 PM
Unknown Object (File)
Sat, Oct 11, 2:09 PM
Unknown Object (File)
Sat, Oct 11, 2:09 PM
Unknown Object (File)
Sat, Oct 11, 5:50 AM
Unknown Object (File)
Fri, Sep 19, 12:37 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/iicbus/gpio/pcf8574.c
161–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
164

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.