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
F162780123: D51857.diff
Thu, Jul 16, 7:44 PM
Unknown Object (File)
Wed, Jul 15, 1:25 PM
Unknown Object (File)
Sat, Jul 4, 3:47 AM
Unknown Object (File)
Tue, Jun 30, 3:50 AM
Unknown Object (File)
Mon, Jun 29, 12:37 AM
Unknown Object (File)
Sun, Jun 28, 5:55 AM
Unknown Object (File)
Sat, Jun 27, 12:47 PM
Unknown Object (File)
Wed, Jun 24, 2:41 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 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.