aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pwc/pwc-if.c')
-rw-r--r--drivers/media/video/pwc/pwc-if.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 4625b265bf98..436a47caf52d 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1047,19 +1047,20 @@ static int pwc_create_sysfs_files(struct video_device *vdev)
1047 struct pwc_device *pdev = video_get_drvdata(vdev); 1047 struct pwc_device *pdev = video_get_drvdata(vdev);
1048 int rc; 1048 int rc;
1049 1049
1050 rc = video_device_create_file(vdev, &dev_attr_button); 1050 rc = device_create_file(&vdev->dev, &dev_attr_button);
1051 if (rc) 1051 if (rc)
1052 goto err; 1052 goto err;
1053 if (pdev->features & FEATURE_MOTOR_PANTILT) { 1053 if (pdev->features & FEATURE_MOTOR_PANTILT) {
1054 rc = video_device_create_file(vdev, &dev_attr_pan_tilt); 1054 rc = device_create_file(&vdev->dev, &dev_attr_pan_tilt);
1055 if (rc) goto err_button; 1055 if (rc) goto err_button;
1056 } 1056 }
1057 1057
1058 return 0; 1058 return 0;
1059 1059
1060err_button: 1060err_button:
1061 video_device_remove_file(vdev, &dev_attr_button); 1061 device_remove_file(&vdev->dev, &dev_attr_button);
1062err: 1062err:
1063 PWC_ERROR("Could not create sysfs files.\n");
1063 return rc; 1064 return rc;
1064} 1065}
1065 1066
@@ -1067,8 +1068,8 @@ static void pwc_remove_sysfs_files(struct video_device *vdev)
1067{ 1068{
1068 struct pwc_device *pdev = video_get_drvdata(vdev); 1069 struct pwc_device *pdev = video_get_drvdata(vdev);
1069 if (pdev->features & FEATURE_MOTOR_PANTILT) 1070 if (pdev->features & FEATURE_MOTOR_PANTILT)
1070 video_device_remove_file(vdev, &dev_attr_pan_tilt); 1071 device_remove_file(&vdev->dev, &dev_attr_pan_tilt);
1071 video_device_remove_file(vdev, &dev_attr_button); 1072 device_remove_file(&vdev->dev, &dev_attr_button);
1072} 1073}
1073 1074
1074#ifdef CONFIG_USB_PWC_DEBUG 1075#ifdef CONFIG_USB_PWC_DEBUG