diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-07-07 07:03:38 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-07-07 07:03:38 -0400 |
commit | c94f70298529d99ac6e1ee7709f61eab00adeb39 (patch) | |
tree | 8e61aadcec3bd299a838cd640bf104eedee61ec3 /drivers/char/drm/drm_stub.c | |
parent | b9523249de59c49e7c2cc83dfa73fb011a489a45 (diff) |
drm: misc cleanup
This patch contains the following cleanups:
- make needlessly global functions static
- remove the following unused global functions:
- drm_fops.c: drm_read
- i915_dma.c: i915_do_cleanup_pageflip
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_stub.c')
-rw-r--r-- | drivers/char/drm/drm_stub.c | 92 |
1 files changed, 45 insertions, 47 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c index 8ccbdef7bb3e..48829a1a086a 100644 --- a/drivers/char/drm/drm_stub.c +++ b/drivers/char/drm/drm_stub.c | |||
@@ -157,52 +157,6 @@ int drm_stub_open(struct inode *inode, struct file *filp) | |||
157 | return err; | 157 | return err; |
158 | } | 158 | } |
159 | 159 | ||
160 | |||
161 | /** | ||
162 | * Register. | ||
163 | * | ||
164 | * \param pdev - PCI device structure | ||
165 | * \param ent entry from the PCI ID table with device type flags | ||
166 | * \return zero on success or a negative number on failure. | ||
167 | * | ||
168 | * Attempt to gets inter module "drm" information. If we are first | ||
169 | * then register the character device and inter module information. | ||
170 | * Try and register, if we fail to register, backout previous work. | ||
171 | */ | ||
172 | int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | ||
173 | struct drm_driver *driver) | ||
174 | { | ||
175 | drm_device_t *dev; | ||
176 | int ret; | ||
177 | |||
178 | DRM_DEBUG("\n"); | ||
179 | |||
180 | dev = drm_calloc(1, sizeof(*dev), DRM_MEM_STUB); | ||
181 | if (!dev) | ||
182 | return -ENOMEM; | ||
183 | |||
184 | pci_enable_device(pdev); | ||
185 | |||
186 | if ((ret = drm_fill_in_dev(dev, pdev, ent, driver))) { | ||
187 | printk(KERN_ERR "DRM: Fill_in_dev failed.\n"); | ||
188 | goto err_g1; | ||
189 | } | ||
190 | if ((ret = drm_get_head(dev, &dev->primary))) | ||
191 | goto err_g1; | ||
192 | |||
193 | /* postinit is a required function to display the signon banner */ | ||
194 | /* drivers add secondary heads here if needed */ | ||
195 | if ((ret = dev->driver->postinit(dev, ent->driver_data))) | ||
196 | goto err_g1; | ||
197 | |||
198 | return 0; | ||
199 | |||
200 | err_g1: | ||
201 | drm_free(dev, sizeof(*dev), DRM_MEM_STUB); | ||
202 | return ret; | ||
203 | } | ||
204 | EXPORT_SYMBOL(drm_get_dev); | ||
205 | |||
206 | /** | 160 | /** |
207 | * Get a secondary minor number. | 161 | * Get a secondary minor number. |
208 | * | 162 | * |
@@ -214,7 +168,7 @@ EXPORT_SYMBOL(drm_get_dev); | |||
214 | * create the proc init entry via proc_init(). This routines assigns | 168 | * create the proc init entry via proc_init(). This routines assigns |
215 | * minor numbers to secondary heads of multi-headed cards | 169 | * minor numbers to secondary heads of multi-headed cards |
216 | */ | 170 | */ |
217 | int drm_get_head(drm_device_t *dev, drm_head_t *head) | 171 | static int drm_get_head(drm_device_t *dev, drm_head_t *head) |
218 | { | 172 | { |
219 | drm_head_t **heads = drm_heads; | 173 | drm_head_t **heads = drm_heads; |
220 | int ret; | 174 | int ret; |
@@ -262,6 +216,50 @@ err_g1: | |||
262 | return ret; | 216 | return ret; |
263 | } | 217 | } |
264 | 218 | ||
219 | /** | ||
220 | * Register. | ||
221 | * | ||
222 | * \param pdev - PCI device structure | ||
223 | * \param ent entry from the PCI ID table with device type flags | ||
224 | * \return zero on success or a negative number on failure. | ||
225 | * | ||
226 | * Attempt to gets inter module "drm" information. If we are first | ||
227 | * then register the character device and inter module information. | ||
228 | * Try and register, if we fail to register, backout previous work. | ||
229 | */ | ||
230 | int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | ||
231 | struct drm_driver *driver) | ||
232 | { | ||
233 | drm_device_t *dev; | ||
234 | int ret; | ||
235 | |||
236 | DRM_DEBUG("\n"); | ||
237 | |||
238 | dev = drm_calloc(1, sizeof(*dev), DRM_MEM_STUB); | ||
239 | if (!dev) | ||
240 | return -ENOMEM; | ||
241 | |||
242 | pci_enable_device(pdev); | ||
243 | |||
244 | if ((ret = drm_fill_in_dev(dev, pdev, ent, driver))) { | ||
245 | printk(KERN_ERR "DRM: Fill_in_dev failed.\n"); | ||
246 | goto err_g1; | ||
247 | } | ||
248 | if ((ret = drm_get_head(dev, &dev->primary))) | ||
249 | goto err_g1; | ||
250 | |||
251 | /* postinit is a required function to display the signon banner */ | ||
252 | /* drivers add secondary heads here if needed */ | ||
253 | if ((ret = dev->driver->postinit(dev, ent->driver_data))) | ||
254 | goto err_g1; | ||
255 | |||
256 | return 0; | ||
257 | |||
258 | err_g1: | ||
259 | drm_free(dev, sizeof(*dev), DRM_MEM_STUB); | ||
260 | return ret; | ||
261 | } | ||
262 | EXPORT_SYMBOL(drm_get_dev); | ||
265 | 263 | ||
266 | /** | 264 | /** |
267 | * Put a device minor number. | 265 | * Put a device minor number. |