This function belongs more in flash.h than common.h so move it.
Also remove the space before the bracket in some calls.
Signed-off-by: Simon Glass <sjg@chromium.org>
#include <console.h>
#include <cpu_func.h>
#include <env.h>
+#include <flash.h>
#include <s_record.h>
#include <net.h>
#include <exports.h>
rc = flash_write((char *) ymodemBuf,
store_addr, res);
if (rc != 0) {
- flash_perror (rc);
+ flash_perror(rc);
return (~0);
}
} else
#include <cli.h>
#include <command.h>
#include <console.h>
+#include <flash.h>
#include <hash.h>
#include <mapmem.h>
#include <watchdog.h>
rc = flash_write((char *)src, (ulong)dst, count * size);
if (rc != 0) {
- flash_perror (rc);
+ flash_perror(rc);
unmap_sysmem(src);
unmap_sysmem(dst);
return (1);
/*-----------------------------------------------------------------------
*/
-void flash_perror (int err)
+void flash_perror(int err)
{
switch (err) {
case ERR_OK:
#include <command.h>
#include <env.h>
#include <env_internal.h>
+#include <flash.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <search.h>
*/
int arch_fixup_fdt(void *blob);
-/* common/flash.c */
-void flash_perror (int);
-
/* common/cmd_source.c */
int source (ulong addr, const char *fit_uname);
#define CFI_CMDSET_AMD_LEGACY 0xFFF0
#endif
+/**
+ * flash_perror() - Print a flash error
+ *
+ * @err: Error number of message to print (ERR_... as below)
+ */
+void flash_perror(int err);
+
/*-----------------------------------------------------------------------
* return codes from flash_write():
*/
#include <common.h>
#include <command.h>
+#include <flash.h>
#include <net.h>
#include <malloc.h>
#include <mapmem.h>