lkml.org 
[lkml]   [2012]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/4] power-supply: smb347-charger: convert to use module_i2c_driver()
    Date
    This reduces the amount of boilerplate code in the driver and makes it a bit
    simpler.

    Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    ---
    drivers/power/smb347-charger.c | 12 +-----------
    1 files changed, 1 insertions(+), 11 deletions(-)

    diff --git a/drivers/power/smb347-charger.c b/drivers/power/smb347-charger.c
    index ce1694d..066794d 100644
    --- a/drivers/power/smb347-charger.c
    +++ b/drivers/power/smb347-charger.c
    @@ -1275,17 +1275,7 @@ static struct i2c_driver smb347_driver = {
    .id_table = smb347_id,
    };

    -static int __init smb347_init(void)
    -{
    - return i2c_add_driver(&smb347_driver);
    -}
    -module_init(smb347_init);
    -
    -static void __exit smb347_exit(void)
    -{
    - i2c_del_driver(&smb347_driver);
    -}
    -module_exit(smb347_exit);
    +module_i2c_driver(smb347_driver);

    MODULE_AUTHOR("Bruce E. Robertson <bruce.e.robertson@intel.com>");
    MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
    --
    1.7.9.1


    \
     
     \ /
      Last update: 2012-04-16 10:49    [W:0.024 / U:31.912 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site