Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370127
b: refs/heads/master
c: b63e6aa
h: refs/heads/master
i:
  370125: 63062c5
  370123: b606643
  370119: db3ee9d
  370111: 984186f
v: v3
  • Loading branch information
David Howells authored and Al Viro committed May 1, 2013
1 parent 1d79575 commit 53b8aba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce089b5472f7d0321bcb2cbc22d85bac15e4778b
refs/heads/master: b63e6aa5028dfde3b360945564290de28b47c2d7
13 changes: 5 additions & 8 deletions trunk/drivers/gpu/drm/drm_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,13 @@ static int drm_proc_create_files(const struct drm_info_list *files, int count,
ent = proc_create_data(files[i].name, S_IRUGO, root,
&drm_proc_fops, tmp);
if (!ent) {
DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
root->name, files[i].name);
DRM_ERROR("Cannot create /proc/dri/%u/%s\n",
minor->index, files[i].name);
list_del(&tmp->list);
kfree(tmp);
ret = -1;
goto fail;
}

}
return 0;

Expand All @@ -137,7 +136,6 @@ static int drm_proc_create_files(const struct drm_info_list *files, int count,
* Initialize the DRI proc filesystem for a device
*
* \param dev DRM device
* \param minor device minor number
* \param root DRI proc dir entry.
* \param dev_root resulting DRI device proc dir entry.
* \return root entry pointer on success, or NULL on failure.
Expand All @@ -146,14 +144,13 @@ static int drm_proc_create_files(const struct drm_info_list *files, int count,
* "/proc/dri/%minor%/", and each entry in proc_list as
* "/proc/dri/%minor%/%name%".
*/
int drm_proc_init(struct drm_minor *minor, int minor_id,
struct proc_dir_entry *root)
int drm_proc_init(struct drm_minor *minor, struct proc_dir_entry *root)
{
char name[64];
char name[12];
int ret;

INIT_LIST_HEAD(&minor->proc_nodes.list);
sprintf(name, "%d", minor_id);
sprintf(name, "%u", minor->index);
minor->proc_root = proc_mkdir(name, root);
if (!minor->proc_root) {
DRM_ERROR("Cannot create /proc/dri/%s\n", name);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int type)
idr_replace(&drm_minors_idr, new_minor, minor_id);

if (type == DRM_MINOR_LEGACY) {
ret = drm_proc_init(new_minor, minor_id, drm_proc_root);
ret = drm_proc_init(new_minor, drm_proc_root);
if (ret) {
DRM_ERROR("DRM: Failed to initialize /proc/dri.\n");
goto err_mem;
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -1546,8 +1546,7 @@ extern struct idr drm_minors_idr;
extern struct drm_local_map *drm_getsarea(struct drm_device *dev);

/* Proc support (drm_proc.h) */
extern int drm_proc_init(struct drm_minor *minor, int minor_id,
struct proc_dir_entry *root);
extern int drm_proc_init(struct drm_minor *minor, struct proc_dir_entry *root);
extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root);

/* Debugfs support */
Expand Down

0 comments on commit 53b8aba

Please sign in to comment.