firmware: arm_sdei: Retrieve event number from event instance
authorGavin Shan <gshan@redhat.com>
Tue, 22 Sep 2020 13:04:13 +0000 (23:04 +1000)
committerWill Deacon <will@kernel.org>
Mon, 28 Sep 2020 20:52:22 +0000 (21:52 +0100)
In sdei_event_create(), the event number is retrieved from the
variable @event_num for the shared event. The event number was
stored in the event instance. So we can fetch it from the event
instance, similar to what we're doing for the private event.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: James Morse <james.morse@arm.com>
Link: https://lore.kernel.org/r/20200922130423.10173-4-gshan@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/firmware/arm_sdei.c

index a126ab7..0f49fff 100644 (file)
@@ -217,7 +217,7 @@ static struct sdei_event *sdei_event_create(u32 event_num,
                        goto fail;
                }
 
-               reg->event_num = event_num;
+               reg->event_num = event->event_num;
                reg->priority = event->priority;
 
                reg->callback = cb;