lkml.org 
[lkml]   [2006]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[CFT 3/29] Add ecard_bus_type probe/remove/shutdown methods
    Date
    From
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

    ---
    arch/arm/kernel/ecard.c | 14 ++++++++------
    1 files changed, 8 insertions(+), 6 deletions(-)

    diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej -x .git linus/arch/arm/kernel/ecard.c linux/arch/arm/kernel/ecard.c
    --- linus/arch/arm/kernel/ecard.c Sun Nov 6 22:14:13 2005
    +++ linux/arch/arm/kernel/ecard.c Sun Nov 13 15:52:20 2005
    @@ -1146,9 +1146,11 @@ static void ecard_drv_shutdown(struct de
    struct ecard_driver *drv = ECARD_DRV(dev->driver);
    struct ecard_request req;

    - if (drv->shutdown)
    - drv->shutdown(ec);
    - ecard_release(ec);
    + if (dev->driver) {
    + if (drv->shutdown)
    + drv->shutdown(ec);
    + ecard_release(ec);
    + }

    /*
    * If this card has a loader, call the reset handler.
    @@ -1163,9 +1165,6 @@ static void ecard_drv_shutdown(struct de
    int ecard_register_driver(struct ecard_driver *drv)
    {
    drv->drv.bus = &ecard_bus_type;
    - drv->drv.probe = ecard_drv_probe;
    - drv->drv.remove = ecard_drv_remove;
    - drv->drv.shutdown = ecard_drv_shutdown;

    return driver_register(&drv->drv);
    }
    @@ -1194,6 +1193,9 @@ struct bus_type ecard_bus_type = {
    .name = "ecard",
    .dev_attrs = ecard_dev_attrs,
    .match = ecard_match,
    + .probe = ecard_drv_probe,
    + .remove = ecard_drv_remove,
    + .shutdown = ecard_drv_shutdown,
    };

    static int ecard_bus_init(void)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-01-05 15:35    [W:4.122 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site