File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -413,10 +413,10 @@ static int uio_get_minor(struct uio_device *idev)
413
413
return retval ;
414
414
}
415
415
416
- static void uio_free_minor (struct uio_device * idev )
416
+ static void uio_free_minor (unsigned long minor )
417
417
{
418
418
mutex_lock (& minor_lock );
419
- idr_remove (& uio_idr , idev -> minor );
419
+ idr_remove (& uio_idr , minor );
420
420
mutex_unlock (& minor_lock );
421
421
}
422
422
@@ -990,7 +990,7 @@ int __uio_register_device(struct module *owner,
990
990
err_uio_dev_add_attributes :
991
991
device_del (& idev -> dev );
992
992
err_device_create :
993
- uio_free_minor (idev );
993
+ uio_free_minor (idev -> minor );
994
994
put_device (& idev -> dev );
995
995
return ret ;
996
996
}
@@ -1042,11 +1042,13 @@ EXPORT_SYMBOL_GPL(__devm_uio_register_device);
1042
1042
void uio_unregister_device (struct uio_info * info )
1043
1043
{
1044
1044
struct uio_device * idev ;
1045
+ unsigned long minor ;
1045
1046
1046
1047
if (!info || !info -> uio_dev )
1047
1048
return ;
1048
1049
1049
1050
idev = info -> uio_dev ;
1051
+ minor = idev -> minor ;
1050
1052
1051
1053
mutex_lock (& idev -> info_lock );
1052
1054
uio_dev_del_attributes (idev );
@@ -1062,7 +1064,7 @@ void uio_unregister_device(struct uio_info *info)
1062
1064
1063
1065
device_unregister (& idev -> dev );
1064
1066
1065
- uio_free_minor (idev );
1067
+ uio_free_minor (minor );
1066
1068
1067
1069
return ;
1068
1070
}
You can’t perform that action at this time.
0 commit comments