Re: [PATCH v9 7/7] rust: irq: add &Device<Bound> argument to irq callbacks
From: Danilo Krummrich
Date: Mon Aug 11 2025 - 13:30:29 EST
On Mon Aug 11, 2025 at 7:00 PM CEST, Daniel Almeida wrote:
>
>
>> On 11 Aug 2025, at 13:03, Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx> wrote:
>>
>> From: Alice Ryhl <aliceryhl@xxxxxxxxxx>
>>
>> When working with a bus device, many operations are only possible while
>> the device is still bound. The &Device<Bound> type represents a proof in
>> the type system that you are in a scope where the device is guaranteed
>> to still be bound. Since we deregister irq callbacks when unbinding a
>> device, if an irq callback is running, that implies that the device has
>> not yet been unbound.
>>
>> To allow drivers to take advantage of that, add an additional argument
>> to irq callbacks.
>>
>> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
>
> Sorry. I forgot to add my SOB here.
>
>
> Perhaps this can be added when the patch is being applied in order to cut down on the
> number of versions, and therefore avoid the extra noise? Otherwise let me know.
>
> Signed-off-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
Sure -- no need to resubmit AFAIC.