Re: [PATCH] musb: Kill __init from function that are called at other times as well.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 06, 2012 at 05:01:46PM +0300, Pantelis Antoniou wrote:
> Marking functions as __init or __devinit and calling them at other times
> leads to predictable crashes (if you're lucky).
> 
> Remove them for now.
> 
> Signed-off-by: Pantelis Antoniou <panto@xxxxxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/usb/musb/musb_core.c    | 16 ++++++++--------
>  drivers/usb/musb/musb_debugfs.c |  2 +-
>  drivers/usb/musb/musb_dma.h     |  2 +-
>  drivers/usb/musb/musb_gadget.c  |  6 +++---
>  drivers/usb/musb/musbhsdma.c    |  2 +-
>  drivers/usb/musb/omap2430.c     |  2 +-
>  6 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 26f1bef..215d2d5 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1160,7 +1160,7 @@ static struct musb_fifo_cfg __devinitdata mode_5_cfg[] = {
>   *
>   * returns negative errno or offset for next fifo.
>   */
> -static int __devinit
> +static int
>  fifo_setup(struct musb *musb, struct musb_hw_ep  *hw_ep,
>  		const struct musb_fifo_cfg *cfg, u16 offset)

Are you sure all these functions are called from outside .init.text ? At
least fifo_setup(), ep_config_from_table() and musb_core_init() are only
during probe(), which sits in .init.text too.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux