diff options
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 3299175da6ac..955f32cbce53 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -112,45 +112,6 @@ err_undo: | |||
112 | EXPORT_SYMBOL(drm_open); | 112 | EXPORT_SYMBOL(drm_open); |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * File \c open operation. | ||
116 | * | ||
117 | * \param inode device inode. | ||
118 | * \param filp file pointer. | ||
119 | * | ||
120 | * Puts the dev->fops corresponding to the device minor number into | ||
121 | * \p filp, call the \c open method, and restore the file operations. | ||
122 | */ | ||
123 | int drm_stub_open(struct inode *inode, struct file *filp) | ||
124 | { | ||
125 | struct drm_device *dev; | ||
126 | struct drm_minor *minor; | ||
127 | int err = -ENODEV; | ||
128 | const struct file_operations *new_fops; | ||
129 | |||
130 | DRM_DEBUG("\n"); | ||
131 | |||
132 | mutex_lock(&drm_global_mutex); | ||
133 | minor = drm_minor_acquire(iminor(inode)); | ||
134 | if (IS_ERR(minor)) | ||
135 | goto out_unlock; | ||
136 | |||
137 | dev = minor->dev; | ||
138 | new_fops = fops_get(dev->driver->fops); | ||
139 | if (!new_fops) | ||
140 | goto out_release; | ||
141 | |||
142 | replace_fops(filp, new_fops); | ||
143 | if (filp->f_op->open) | ||
144 | err = filp->f_op->open(inode, filp); | ||
145 | |||
146 | out_release: | ||
147 | drm_minor_release(minor); | ||
148 | out_unlock: | ||
149 | mutex_unlock(&drm_global_mutex); | ||
150 | return err; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * Check whether DRI will run on this CPU. | 115 | * Check whether DRI will run on this CPU. |
155 | * | 116 | * |
156 | * \return non-zero if the DRI will run on this CPU, or zero otherwise. | 117 | * \return non-zero if the DRI will run on this CPU, or zero otherwise. |