1. 28 Jun, 2016 40 commits
    • Daniel Lezcano's avatar
      clocksource/drivers/atmel-pit: Convert init function to return error · 504f34c9
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      504f34c9
    • Daniel Lezcano's avatar
      clocksource/drivers/atlas7: Convert init function to return error · c41c96dd
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      c41c96dd
    • Daniel Lezcano's avatar
      clocksource/drivers/pistachio: Convert init function to return error · 41505a20
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      41505a20
    • Daniel Lezcano's avatar
      clocksource/drivers/orion: Convert init function to return error · fbe4b356
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      fbe4b356
    • Daniel Lezcano's avatar
      clocksource/drivers/time-lpc32xx: Convert init function to return error · 4e2afeb9
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarSylvain Lemieux <slemieux.tyco@gmail.com>
      4e2afeb9
    • Daniel Lezcano's avatar
      clocksource/drivers/time-efm32: Convert init function to return error · dc501113
      Daniel Lezcano authored
      The init functions do not return any error and let the caller unaware of
      the state of the system.
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      dc501113
    • Daniel Lezcano's avatar
      clocksource/drivers/time-armada-370-xp: Convert init function to return error · 12549e27
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      12549e27
    • Daniel Lezcano's avatar
      clocksource/drivers/tegra20: Convert init function to return error · 53978bba
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
          make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      53978bba
    • Daniel Lezcano's avatar
      clocksource/drivers/tango_xtal: Convert init function to return error · 0683d503
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and leave the caller unaware of the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just returns an error code from the init function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
      0683d503
    • Daniel Lezcano's avatar
      clocksource/drivers/sun4i: Convert init function to return error · ce5dc743
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      ce5dc743
    • Daniel Lezcano's avatar
      clocksource/drivers/samsung_pwm: Convert init function to return error · 0993f57b
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      0993f57b
    • Daniel Lezcano's avatar
      clocksource/drivers/qcom: Convert init function to return error · ab51189c
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      ab51189c
    • Daniel Lezcano's avatar
      clocksource/drivers/pxa: Convert init function to return error · be3aff84
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      be3aff84
    • Daniel Lezcano's avatar
      clocksource/drivers/nomadik-mtu: Convert init function to return error · e46105af
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      e46105af
    • Daniel Lezcano's avatar
      clocksource/drivers/mxs: Convert init function to return error · e1d2b9f0
      Daniel Lezcano authored
      The init function does not return any error, it prints a message, returns and
      lets the caller unaware if the state of the system.
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      e1d2b9f0
    • Daniel Lezcano's avatar
      clocksource/drivers/mps2-timer: Convert init function to return error · 0cc7afc6
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
      0cc7afc6
    • Daniel Lezcano's avatar
      clocksource/drivers/moxart: Convert init function to return error · b7357e65
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      b7357e65
    • Daniel Lezcano's avatar
      clocksource/drivers/mips-gic-timer: Convert init function to return error · d8152bf8
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      d8152bf8
    • Daniel Lezcano's avatar
      clocksource/drivers/meson6_timer.c: Convert init function to return error · ca46acb9
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      ca46acb9
    • Daniel Lezcano's avatar
      clocksource/drivers/h8300_tpu: Convert init function to return error · f2f9900c
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      f2f9900c
    • Daniel Lezcano's avatar
      clocksource/drivers/h8300_timer8: Convert init function to return error · 691f8f87
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      691f8f87
    • Daniel Lezcano's avatar
      clocksource/drivers/h8300_timer16: Convert init function to return error · eacf2091
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      eacf2091
    • Daniel Lezcano's avatar
      clocksource/drivers/arm_global_timer: Convert init function to return error · 5a54c187
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarMaxime Coquelin <maxime.coquelin@st.com>
      5a54c187
    • Daniel Lezcano's avatar
      clocksource/drivers/arm_arch_timer: Convert init function to return error · 3c0731db
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      3c0731db
    • Daniel Lezcano's avatar
      clocksource/drivers/fsl_ftm_timer: Convert init function to return error · 17c8669d
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      17c8669d
    • Daniel Lezcano's avatar
      clocksource/drivers/clksrc-dbx500: Convert init function to return error · 108a4ed9
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      108a4ed9
    • Daniel Lezcano's avatar
      clocksource/drivers/bcm_kona: Convert init function to return error · 59519774
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarRay Jui <ray.jui@broadcom.com>
      59519774
    • Daniel Lezcano's avatar
      clocksource/drivers/bcm2835_timer: Convert init function to return error · 524a7f08
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarEric Anholt <eric@anholt.net>
      524a7f08
    • Daniel Lezcano's avatar
      clocksource/drivers/armv7m_systick: Convert init function to return error · 802fa498
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarMaxime Coquelin <maxime.coquelin@st.com>
      802fa498
    • Daniel Lezcano's avatar
      clocksource/drivers/digicolor: Convert init function to return error · c77b9d44
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarBaruch Siach <baruch@tkos.co.il>
      c77b9d44
    • Daniel Lezcano's avatar
      clocksource/drivers/clps711x: Convert init function to return error · 04410efb
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
        - panic, thus leading to a kernel crash while another timer may work and
             make the system boot up correctly
      
        or
      
        - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      04410efb
    • Daniel Lezcano's avatar
      clocksource/drivers/dw_apb_timer: Convert init function to return error · 2e1773f8
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      2e1773f8
    • Daniel Lezcano's avatar
      clocksource/drivers/st_lpc: Convert init function to return error · 84309e0a
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarPatrice Chotard <patrice.chotard@st.com>
      Acked-by: default avatarMaxime Coquelin <maxime.coquelin@st.com>
      84309e0a
    • Daniel Lezcano's avatar
      clocksource/drivers/cadence_ttc: Convert init function to return error · 70504f31
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarSören Brinkmann <soren.brinkmann@xilinx.com>
      70504f31
    • Daniel Lezcano's avatar
      clocksource/drivers/asm9260: Convert init function to return error · be5eb33d
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      be5eb33d
    • Daniel Lezcano's avatar
      clocksource/drivers/exynos_mct: Convert init function to return error · 5e558ebd
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      5e558ebd
    • Daniel Lezcano's avatar
      clocksource/drivers/mtk_timer: Convert init function to return error · d64e24ce
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
      d64e24ce
    • Daniel Lezcano's avatar
      clocksource/drivers/rockchip_timer: Convert init function to return error · 8bdd5a2e
      Daniel Lezcano authored
      The init functions do not return any error. They behave as the following:
      
       - panic, thus leading to a kernel crash while another timer may work and
         make the system boot up correctly
      
       or
      
       - print an error and let the caller unaware if the state of the system
      
      Change that by converting the init functions to return an error conforming
      to the CLOCKSOURCE_OF_RET prototype.
      
      Proper error handling (rollback, errno value) will be changed later case
      by case, thus this change just return back an error or success in the init
      function.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
      
      on a rk3399-evb
      Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
      8bdd5a2e
    • Daniel Lezcano's avatar
      clocksource/drivers/clksrc-probe: Introduce init functions with return code · b7c4db86
      Daniel Lezcano authored
      Currently, the clksrc-probe is not able to handle any error from the init
      functions. There are different issues with the current code:
       - the code is duplicated in the init functions by writing error
       - every driver tends to panic in its own init function
       - counting the number of clocksources is not reliable
      
      This patch adds another table to store the functions returning an error.
      The table is temporary while we convert all the drivers to return an error
      and will disappear.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      b7c4db86
    • Daniel Lezcano's avatar
      of: Add a new macro to declare_of for one parameter function returning a value · c35d9292
      Daniel Lezcano authored
      The macro OF_DECLARE_1 expect a void (*func)(struct device_node *) while the
      OF_DECLARE_2 expect a int (*func)(struct device_node *, struct device_node *).
      
      The second one allows to pass an init function returning a value, which make
      possible to call the functions in the table and check the return value in order
      to catch at a higher level the errors and handle them from there instead of
      doing a panic in each driver (well at least this is the case for the clkevt).
      
      Unfortunately the OF_DECLARE_1 does not allow that and that lead to some code
      duplication and crappyness in the drivers.
      
      The OF_DECLARE_1 is used by all the clk drivers and the clocksource/clockevent
      drivers. It is not possible to do the change in one shot as we have to change
      all the init functions.
      
      The OF_DECLARE_2 specifies an init function prototype with two parameters with
      the node and its parent. The latter won't be used, ever, in the timer drivers.
      
      Introduce a OF_DECLARE_1_RET macro to be used, and hopefully we can smoothly
      and iteratively change the users of OF_DECLARE_1 to use the new macro instead.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      c35d9292