Changeset 60744cb in mainline for uspace/drv/block/isa-ide/isa-ide.c


Ignore:
Timestamp:
2024-05-17T17:51:56Z (7 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
1801005
Parents:
646849b3
Message:

Let driver specify any argument to IRQ handler

This allows the driver to register a single handler for multiple
interrupts and still distinguish between them. It also removes
the extra step of having to get softstate from ddf_dev_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/isa-ide/isa-ide.c

    r646849b3 r60744cb  
    5959static errno_t isa_ide_init_irq(isa_ide_channel_t *);
    6060static void isa_ide_fini_irq(isa_ide_channel_t *);
    61 static void isa_ide_irq_handler(ipc_call_t *, ddf_dev_t *);
     61static void isa_ide_irq_handler(ipc_call_t *, void *);
    6262
    6363static void isa_ide_write_data_16(void *, uint16_t *, size_t);
     
    256256
    257257        ddf_msg(LVL_NOTE, "IRQ %d", chan->irq);
    258         rc = register_interrupt_handler_arg(chan->ctrl->dev, chan->irq,
     258        rc = register_interrupt_handler(chan->ctrl->dev, chan->irq,
    259259            isa_ide_irq_handler, (void *)chan, &irq_code, &chan->ihandle);
    260260        if (rc != EOK) {
     
    291291 *
    292292 * @param call Call data
    293  * @param dev Device that caused the interrupt
    294  */
    295 static void isa_ide_irq_handler(ipc_call_t *call, ddf_dev_t *xdev)
    296 {
    297         isa_ide_channel_t *chan = (isa_ide_channel_t *)(void *)xdev; // XXX
     293 * @param arg Argument (isa_ide_channel_t *)
     294 */
     295static void isa_ide_irq_handler(ipc_call_t *call, void *arg)
     296{
     297        isa_ide_channel_t *chan = (isa_ide_channel_t *)arg;
    298298        uint8_t status;
    299299        async_sess_t *parent_sess;
Note: See TracChangeset for help on using the changeset viewer.