aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ctrl.c2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-main.c5
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-sysfs.c8
3 files changed, 3 insertions, 12 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
index f569b00201dd..46f156fb108c 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
@@ -410,7 +410,7 @@ static int parse_mtoken(const char *ptr,unsigned int len,
410 int msk; 410 int msk;
411 *valptr = 0; 411 *valptr = 0;
412 for (idx = 0, msk = 1; valid_bits; idx++, msk <<= 1) { 412 for (idx = 0, msk = 1; valid_bits; idx++, msk <<= 1) {
413 if (!msk & valid_bits) continue; 413 if (!(msk & valid_bits)) continue;
414 valid_bits &= ~msk; 414 valid_bits &= ~msk;
415 if (!names[idx]) continue; 415 if (!names[idx]) continue;
416 slen = strlen(names[idx]); 416 slen = strlen(names[idx]);
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c
index ca9e2789c8ca..11b3b2e84b90 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -136,14 +136,13 @@ static int __init pvr_init(void)
136 136
137static void __exit pvr_exit(void) 137static void __exit pvr_exit(void)
138{ 138{
139
140 pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); 139 pvr2_trace(PVR2_TRACE_INIT,"pvr_exit");
141 140
141 usb_deregister(&pvr_driver);
142
142#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS 143#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
143 pvr2_sysfs_class_destroy(class_ptr); 144 pvr2_sysfs_class_destroy(class_ptr);
144#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ 145#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
145
146 usb_deregister(&pvr_driver);
147} 146}
148 147
149module_init(pvr_init); 148module_init(pvr_init);
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
index 2ee3c3049e8f..3c57a7d8200b 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
@@ -905,13 +905,6 @@ struct pvr2_sysfs *pvr2_sysfs_create(struct pvr2_context *mp,
905} 905}
906 906
907 907
908static int pvr2_sysfs_hotplug(struct device *d,
909 struct kobj_uevent_env *env)
910{
911 /* Even though we don't do anything here, we still need this function
912 because sysfs will still try to call it. */
913 return 0;
914}
915 908
916struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) 909struct pvr2_sysfs_class *pvr2_sysfs_class_create(void)
917{ 910{
@@ -922,7 +915,6 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void)
922 clp->class.name = "pvrusb2"; 915 clp->class.name = "pvrusb2";
923 clp->class.class_release = pvr2_sysfs_class_release; 916 clp->class.class_release = pvr2_sysfs_class_release;
924 clp->class.dev_release = pvr2_sysfs_release; 917 clp->class.dev_release = pvr2_sysfs_release;
925 clp->class.dev_uevent = pvr2_sysfs_hotplug;
926 if (class_register(&clp->class)) { 918 if (class_register(&clp->class)) {
927 pvr2_sysfs_trace( 919 pvr2_sysfs_trace(
928 "Registration failed for pvr2_sysfs_class id=%p",clp); 920 "Registration failed for pvr2_sysfs_class id=%p",clp);