diff options
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | 1 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 28 |
2 files changed, 25 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h index 5b152ff20bd0..9098494ae59c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | |||
@@ -270,6 +270,7 @@ struct pvr2_hdw { | |||
270 | 270 | ||
271 | int force_dirty; /* consider all controls dirty if true */ | 271 | int force_dirty; /* consider all controls dirty if true */ |
272 | int flag_ok; /* device in known good state */ | 272 | int flag_ok; /* device in known good state */ |
273 | int flag_modulefail; /* true if at least one module failed to load */ | ||
273 | int flag_disconnected; /* flag_ok == 0 due to disconnect */ | 274 | int flag_disconnected; /* flag_ok == 0 due to disconnect */ |
274 | int flag_init_ok; /* true if structure is fully initialized */ | 275 | int flag_init_ok; /* true if structure is fully initialized */ |
275 | int fw1_state; /* current situation with fw1 */ | 276 | int fw1_state; /* current situation with fw1 */ |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 13639b302700..33ea950abb4f 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2030,7 +2030,8 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2030 | fname = (mid < ARRAY_SIZE(module_names)) ? module_names[mid] : NULL; | 2030 | fname = (mid < ARRAY_SIZE(module_names)) ? module_names[mid] : NULL; |
2031 | if (!fname) { | 2031 | if (!fname) { |
2032 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 2032 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
2033 | "Module ID %u for device %s has no name", | 2033 | "Module ID %u for device %s has no name?" |
2034 | " The driver might have a configuration problem.", | ||
2034 | mid, | 2035 | mid, |
2035 | hdw->hdw_desc->description); | 2036 | hdw->hdw_desc->description); |
2036 | return -EINVAL; | 2037 | return -EINVAL; |
@@ -2058,7 +2059,8 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2058 | if (!i2ccnt) { | 2059 | if (!i2ccnt) { |
2059 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 2060 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
2060 | "Module ID %u (%s) for device %s:" | 2061 | "Module ID %u (%s) for device %s:" |
2061 | " No i2c addresses", | 2062 | " No i2c addresses." |
2063 | " The driver might have a configuration problem.", | ||
2062 | mid, fname, hdw->hdw_desc->description); | 2064 | mid, fname, hdw->hdw_desc->description); |
2063 | return -EINVAL; | 2065 | return -EINVAL; |
2064 | } | 2066 | } |
@@ -2090,7 +2092,9 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2090 | 2092 | ||
2091 | if (!sd) { | 2093 | if (!sd) { |
2092 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 2094 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
2093 | "Module ID %u (%s) for device %s failed to load", | 2095 | "Module ID %u (%s) for device %s failed to load." |
2096 | " Possible missing sub-device kernel module or" | ||
2097 | " initialization failure within module.", | ||
2094 | mid, fname, hdw->hdw_desc->description); | 2098 | mid, fname, hdw->hdw_desc->description); |
2095 | return -EIO; | 2099 | return -EIO; |
2096 | } | 2100 | } |
@@ -2132,7 +2136,10 @@ static void pvr2_hdw_load_modules(struct pvr2_hdw *hdw) | |||
2132 | for (idx = 0; idx < ct->cnt; idx++) { | 2136 | for (idx = 0; idx < ct->cnt; idx++) { |
2133 | if (pvr2_hdw_load_subdev(hdw, &ct->lst[idx]) < 0) okFl = 0; | 2137 | if (pvr2_hdw_load_subdev(hdw, &ct->lst[idx]) < 0) okFl = 0; |
2134 | } | 2138 | } |
2135 | if (!okFl) pvr2_hdw_render_useless(hdw); | 2139 | if (!okFl) { |
2140 | hdw->flag_modulefail = !0; | ||
2141 | pvr2_hdw_render_useless(hdw); | ||
2142 | } | ||
2136 | } | 2143 | } |
2137 | 2144 | ||
2138 | 2145 | ||
@@ -2334,6 +2341,19 @@ static void pvr2_hdw_setup(struct pvr2_hdw *hdw) | |||
2334 | break; | 2341 | break; |
2335 | } | 2342 | } |
2336 | } | 2343 | } |
2344 | if (hdw->flag_modulefail) { | ||
2345 | pvr2_trace( | ||
2346 | PVR2_TRACE_ERROR_LEGS, | ||
2347 | "***WARNING*** pvrusb2 driver initialization" | ||
2348 | " failed due to the failure of one or more" | ||
2349 | " sub-device kernel modules."); | ||
2350 | pvr2_trace( | ||
2351 | PVR2_TRACE_ERROR_LEGS, | ||
2352 | "You need to resolve the failing condition" | ||
2353 | " before this driver can function. There" | ||
2354 | " should be some earlier messages giving more" | ||
2355 | " information about the problem."); | ||
2356 | } | ||
2337 | if (procreload) { | 2357 | if (procreload) { |
2338 | pvr2_trace( | 2358 | pvr2_trace( |
2339 | PVR2_TRACE_ERROR_LEGS, | 2359 | PVR2_TRACE_ERROR_LEGS, |