Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: AT91 reboot code
Date: Tue, 1 Nov 2011 14:40:58 +0000	[thread overview]
Message-ID: <20111101144058.GP19187@n2100.arm.linux.org.uk> (raw)

In arch/arm/mach-at91/include/mach/system.h, I find:

void (*at91_arch_reset)(void);

static inline void arch_reset(char mode, const char *cmd)
{
        /* call the CPU-specific reset function */
        if (at91_arch_reset)
                (at91_arch_reset)();
}

Is there any reason this can't just be:

void (*arch_reset)(char mode, const char *cmd);

and then change these:

arch/arm/mach-at91/at91rm9200.c:    at91_arch_reset = at91rm9200_reset;
arch/arm/mach-at91/at91sam9263.c:   at91_arch_reset = at91sam9_alt_reset;
arch/arm/mach-at91/at91sam9260.c:   at91_arch_reset = at91sam9_alt_reset;
arch/arm/mach-at91/at91sam9g45.c:   at91_arch_reset = at91sam9g45_reset;
arch/arm/mach-at91/at91cap9.c:      at91_arch_reset = at91cap9_reset;
arch/arm/mach-at91/at91sam9261.c:   at91_arch_reset = at91sam9_alt_reset;
arch/arm/mach-at91/at91sam9rl.c:    at91_arch_reset = at91sam9_alt_reset;

and the assigned function prototypes appropriately?  This level of
additional indirection is a right pain for trying to clean up stuff in
this area and it needs to die.

             reply	other threads:[~2011-11-01 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 14:40 Russell King - ARM Linux [this message]
2011-11-02  5:43 ` AT91 reboot code Andrew Victor
2011-11-02 10:24   ` Will Deacon
2011-11-02 14:59   ` Russell King - ARM Linux
2011-11-02 15:12     ` Russell King - ARM Linux
2011-11-02 15:41       ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111101144058.GP19187@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox