svn commit: r291541 - stable/10/sys/dev/ispfw
Alexander Motin
mav at FreeBSD.org
Mon Nov 30 22:58:50 UTC 2015
Author: mav
Date: Mon Nov 30 22:58:48 2015
New Revision: 291541
URL: https://svnweb.freebsd.org/changeset/base/291541
Log:
MFC r289755: Remove residual verbosity.
firmware_register() already reports errors.
Modified:
stable/10/sys/dev/ispfw/ispfw.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/ispfw/ispfw.c
==============================================================================
--- stable/10/sys/dev/ispfw/ispfw.c Mon Nov 30 22:53:55 2015 (r291540)
+++ stable/10/sys/dev/ispfw/ispfw.c Mon Nov 30 22:58:48 2015 (r291541)
@@ -126,43 +126,27 @@ static int isp_2500_loaded;
#define ISPFW_VERSION 1
-#if !defined(KLD_MODULE)
-#define ISPFW_KLD 0
-#else
-#define ISPFW_KLD 1
-#endif
-
#define RMACRO(token) do { \
if (token##_loaded) \
break; \
if (firmware_register(#token, token##_risc_code, \
token##_risc_code[3] * sizeof(token##_risc_code[3]), \
- ISPFW_VERSION, NULL) == NULL) { \
- printf("%s: unable to register firmware <%s>\n", \
- MODULE_NAME, #token); \
+ ISPFW_VERSION, NULL) == NULL) \
break; \
- } \
token##_loaded++; \
- if (bootverbose || ISPFW_KLD) \
- printf("%s: registered firmware <%s>\n", MODULE_NAME, \
- #token); \
} while (0)
#define UMACRO(token) do { \
if (!token##_loaded) \
break; \
if (firmware_unregister(#token) != 0) { \
- printf("%s: unable to unregister firmware <%s>\n", \
- MODULE_NAME, #token); \
+ error = EBUSY; \
break; \
} \
token##_loaded--; \
- if (bootverbose || ISPFW_KLD) \
- printf("%s: unregistered firmware <%s>\n", MODULE_NAME, \
- #token); \
} while (0)
-static void
+static int
do_load_fw(void)
{
@@ -196,11 +180,13 @@ do_load_fw(void)
#if defined(ISP_2500)
RMACRO(isp_2500);
#endif
+ return (0);
}
-static void
+static int
do_unload_fw(void)
{
+ int error = 0;
#if defined(ISP_1000)
UMACRO(isp_1000);
@@ -232,6 +218,7 @@ do_unload_fw(void)
#if defined(ISP_2500)
UMACRO(isp_2500);
#endif
+ return (error);
}
static int
@@ -240,17 +227,11 @@ module_handler(module_t mod, int what, v
switch (what) {
case MOD_LOAD:
- do_load_fw();
- break;
+ return (do_load_fw());
case MOD_UNLOAD:
- do_unload_fw();
- break;
- case MOD_SHUTDOWN:
- break;
- default:
- return (EOPNOTSUPP);
+ return (do_unload_fw());
}
- return (0);
+ return (EOPNOTSUPP);
}
static moduledata_t ispfw_mod = {
MODULE_NAME, module_handler, NULL
More information about the svn-src-stable-10
mailing list