• Viresh Kumar's avatar
    watchdog: mpcore_wdt: Use devm routines · 75f5a536
    Viresh Kumar authored
    mpcore_wdt driver currently uses normal kzalloc, request_irq, ioremap, etc
    routines. This patch replaces these routines with devm_kzalloc and
    devm_request_mem_region etc, so that we don't need to handle freeing of
    resources for error cases and module removal routine.
    
    Also, request_irq is moved before registering misc device, so that we are ready
    for irq as soon as device is registered.
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
    Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
    75f5a536
mpcore_wdt.c 10.4 KB