Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9412
b: refs/heads/master
c: 6660022
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Sep 29, 2005
1 parent dde1302 commit 54e85bb
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 46 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: ecba97d4aacf4e80c56eb73e39af0369cb8539a4
refs/heads/master: 666002218d59db271e5c1ede1d80227170c51987
2 changes: 1 addition & 1 deletion trunk/drivers/char/drm/drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static int __init drm_core_init(void)
goto err_p2;
}

drm_proc_root = create_proc_entry("dri", S_IFDIR, NULL);
drm_proc_root = proc_mkdir("dri", NULL);
if (!drm_proc_root) {
DRM_ERROR("Cannot create /proc/dri\n");
ret = -1;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/drm/drm_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int drm_proc_init(drm_device_t *dev, int minor,
char name[64];

sprintf(name, "%d", minor);
*dev_root = create_proc_entry(name, S_IFDIR, root);
*dev_root = proc_mkdir(name, root);
if (!*dev_root) {
DRM_ERROR("Cannot create /proc/dri/%s\n", name);
return -1;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/isdn/divert/divert_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ divert_dev_init(void)
init_waitqueue_head(&rd_queue);

#ifdef CONFIG_PROC_FS
isdn_proc_entry = create_proc_entry("isdn", S_IFDIR | S_IRUGO | S_IXUGO, proc_net);
isdn_proc_entry = proc_mkdir("net/isdn", NULL);
if (!isdn_proc_entry)
return (-1);
isdn_divert_entry = create_proc_entry("divert", S_IFREG | S_IRUGO, isdn_proc_entry);
if (!isdn_divert_entry) {
remove_proc_entry("isdn", proc_net);
remove_proc_entry("net/isdn", NULL);
return (-1);
}
isdn_divert_entry->proc_fops = &isdn_fops;
Expand All @@ -312,7 +312,7 @@ divert_dev_deinit(void)

#ifdef CONFIG_PROC_FS
remove_proc_entry("divert", isdn_proc_entry);
remove_proc_entry("isdn", proc_net);
remove_proc_entry("net/isdn", NULL);
#endif /* CONFIG_PROC_FS */

return (0);
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/isdn/hardware/eicon/diva_didd.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ static char *DRIVERNAME =
static char *DRIVERLNAME = "divadidd";
char *DRIVERRELEASE_DIDD = "2.0";

static char *main_proc_dir = "eicon";

MODULE_DESCRIPTION("DIDD table driver for diva drivers");
MODULE_AUTHOR("Cytronics & Melware, Eicon Networks");
MODULE_SUPPORTED_DEVICE("Eicon diva drivers");
Expand Down Expand Up @@ -89,7 +87,7 @@ proc_read(char *page, char **start, off_t off, int count, int *eof,

static int DIVA_INIT_FUNCTION create_proc(void)
{
proc_net_eicon = create_proc_entry(main_proc_dir, S_IFDIR, proc_net);
proc_net_eicon = proc_mkdir("net/eicon", NULL);

if (proc_net_eicon) {
if ((proc_didd =
Expand All @@ -105,7 +103,7 @@ static int DIVA_INIT_FUNCTION create_proc(void)
static void DIVA_EXIT_FUNCTION remove_proc(void)
{
remove_proc_entry(DRIVERLNAME, proc_net_eicon);
remove_proc_entry(main_proc_dir, proc_net);
remove_proc_entry("net/eicon", NULL);
}

static int DIVA_INIT_FUNCTION divadidd_init(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/hardware/eicon/divasproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ int create_adapter_proc(diva_os_xdi_adapter_t * a)
char tmp[16];

sprintf(tmp, "%s%d", adapter_dir_name, a->controller);
if (!(de = create_proc_entry(tmp, S_IFDIR, proc_net_eicon)))
if (!(de = proc_mkdir(tmp, proc_net_eicon)))
return (0);
a->proc_adapter_dir = (void *) de;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/hysdn/hysdn_procconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ hysdn_procconf_init(void)
hysdn_card *card;
uchar conf_name[20];

hysdn_proc_entry = create_proc_entry(PROC_SUBDIR_NAME, S_IFDIR | S_IRUGO | S_IXUGO, proc_net);
hysdn_proc_entry = proc_mkdir(PROC_SUBDIR_NAME, proc_net);
if (!hysdn_proc_entry) {
printk(KERN_ERR "HYSDN: unable to create hysdn subdir\n");
return (-1);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/cpia.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ static void destroy_proc_cpia_cam(struct cam_data *cam)

static void proc_cpia_create(void)
{
cpia_proc_root = create_proc_entry("cpia", S_IFDIR, NULL);
cpia_proc_root = proc_mkdir("cpia", NULL);

if (cpia_proc_root)
cpia_proc_root->owner = THIS_MODULE;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static irqreturn_t ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs
static inline void ibmveth_schedule_replenishing(struct ibmveth_adapter*);

#ifdef CONFIG_PROC_FS
#define IBMVETH_PROC_DIR "ibmveth"
#define IBMVETH_PROC_DIR "net/ibmveth"
static struct proc_dir_entry *ibmveth_proc_dir;
#endif

Expand Down Expand Up @@ -1010,15 +1010,15 @@ static int __devexit ibmveth_remove(struct vio_dev *dev)
#ifdef CONFIG_PROC_FS
static void ibmveth_proc_register_driver(void)
{
ibmveth_proc_dir = create_proc_entry(IBMVETH_PROC_DIR, S_IFDIR, proc_net);
ibmveth_proc_dir = proc_mkdir(IBMVETH_PROC_DIR, NULL);
if (ibmveth_proc_dir) {
SET_MODULE_OWNER(ibmveth_proc_dir);
}
}

static void ibmveth_proc_unregister_driver(void)
{
remove_proc_entry(IBMVETH_PROC_DIR, proc_net);
remove_proc_entry(IBMVETH_PROC_DIR, NULL);
}

static void *ibmveth_seq_start(struct seq_file *seq, loff_t *pos)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/irda/vlsi_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,11 +1875,11 @@ static int __init vlsi_mod_init(void)

sirpulse = !!sirpulse;

/* create_proc_entry returns NULL if !CONFIG_PROC_FS.
/* proc_mkdir returns NULL if !CONFIG_PROC_FS.
* Failure to create the procfs entry is handled like running
* without procfs - it's not required for the driver to work.
*/
vlsi_proc_root = create_proc_entry(PROC_DIR, S_IFDIR, NULL);
vlsi_proc_root = proc_mkdir(PROC_DIR, NULL);
if (vlsi_proc_root) {
/* protect registered procdir against module removal.
* Because we are in the module init path there's no race
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ static int __init pppoe_proc_init(void)
{
struct proc_dir_entry *p;

p = create_proc_entry("pppoe", S_IRUGO, proc_net);
p = create_proc_entry("net/pppoe", S_IRUGO, NULL);
if (!p)
return -ENOMEM;

Expand Down Expand Up @@ -1142,7 +1142,7 @@ static void __exit pppoe_exit(void)
dev_remove_pack(&pppoes_ptype);
dev_remove_pack(&pppoed_ptype);
unregister_netdevice_notifier(&pppoe_notifier);
remove_proc_entry("pppoe", proc_net);
remove_proc_entry("net/pppoe", NULL);
proto_unregister(&pppoe_sk_proto);
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/sk98lin/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static int SkDrvDeInitAdapter(SK_AC *pAC, int devNbr);
* Extern Function Prototypes
*
******************************************************************************/
static const char SKRootName[] = "sk98lin";
static const char SKRootName[] = "net/sk98lin";
static struct proc_dir_entry *pSkRootDir;
extern struct file_operations sk_proc_fops;

Expand Down Expand Up @@ -5242,20 +5242,20 @@ static int __init skge_init(void)
{
int error;

pSkRootDir = proc_mkdir(SKRootName, proc_net);
pSkRootDir = proc_mkdir(SKRootName, NULL);
if (pSkRootDir)
pSkRootDir->owner = THIS_MODULE;

error = pci_register_driver(&skge_driver);
if (error)
proc_net_remove(SKRootName);
remove_proc_entry(SKRootName, NULL);
return error;
}

static void __exit skge_exit(void)
{
pci_unregister_driver(&skge_driver);
proc_net_remove(SKRootName);
remove_proc_entry(SKRootName, NULL);

}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2849,8 +2849,7 @@ sg_proc_init(void)
struct proc_dir_entry *pdep;
struct sg_proc_leaf * leaf;

sg_proc_sgp = create_proc_entry(sg_proc_sg_dirname,
S_IFDIR | S_IRUGO | S_IXUGO, NULL);
sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL);
if (!sg_proc_sgp)
return 1;
for (k = 0; k < num_leaves; ++k) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/media/vicam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ vicam_write_proc_gain(struct file *file, const char *buffer,
static void
vicam_create_proc_root(void)
{
vicam_proc_root = create_proc_entry("video/vicam", S_IFDIR, 0);
vicam_proc_root = proc_mkdir("video/vicam", NULL);

if (vicam_proc_root)
vicam_proc_root->owner = THIS_MODULE;
Expand Down Expand Up @@ -1181,7 +1181,7 @@ vicam_create_proc_entry(struct vicam_camera *cam)

sprintf(name, "video%d", cam->vdev.minor);

cam->proc_dir = create_proc_entry(name, S_IFDIR, vicam_proc_root);
cam->proc_dir = proc_mkdir(name, vicam_proc_root);

if ( !cam->proc_dir )
return; // FIXME: We should probably return an error here
Expand Down
23 changes: 6 additions & 17 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@

/* Used to help with determining the pkts on receive */
#define PKTGEN_MAGIC 0xbe9be955
#define PG_PROC_DIR "pktgen"
#define PG_PROC_DIR "net/pktgen"

#define MAX_CFLOWS 65536

Expand Down Expand Up @@ -1476,18 +1476,7 @@ static int proc_thread_write(struct file *file, const char __user *user_buffer,

static int create_proc_dir(void)
{
int len;
/* does proc_dir already exists */
len = strlen(PG_PROC_DIR);

for (pg_proc_dir = proc_net->subdir; pg_proc_dir; pg_proc_dir=pg_proc_dir->next) {
if ((pg_proc_dir->namelen == len) &&
(! memcmp(pg_proc_dir->name, PG_PROC_DIR, len)))
break;
}

if (!pg_proc_dir)
pg_proc_dir = create_proc_entry(PG_PROC_DIR, S_IFDIR, proc_net);
pg_proc_dir = proc_mkdir(PG_PROC_DIR, NULL);

if (!pg_proc_dir)
return -ENODEV;
Expand All @@ -1497,7 +1486,7 @@ static int create_proc_dir(void)

static int remove_proc_dir(void)
{
remove_proc_entry(PG_PROC_DIR, proc_net);
remove_proc_entry(PG_PROC_DIR, NULL);
return 0;
}

Expand Down Expand Up @@ -2908,7 +2897,7 @@ static int pktgen_add_device(struct pktgen_thread *t, const char* ifname)
pkt_dev->udp_dst_max = 9;

strncpy(pkt_dev->ifname, ifname, 31);
sprintf(pkt_dev->fname, "net/%s/%s", PG_PROC_DIR, ifname);
sprintf(pkt_dev->fname, "%s/%s", PG_PROC_DIR, ifname);

if (! pktgen_setup_dev(pkt_dev)) {
printk("pktgen: ERROR: pktgen_setup_dev failed.\n");
Expand Down Expand Up @@ -2981,7 +2970,7 @@ static int pktgen_create_thread(const char* name, int cpu)
spin_lock_init(&t->if_lock);
t->cpu = cpu;

sprintf(t->fname, "net/%s/%s", PG_PROC_DIR, t->name);
sprintf(t->fname, "%s/%s", PG_PROC_DIR, t->name);
t->proc_ent = create_proc_entry(t->fname, 0600, NULL);
if (!t->proc_ent) {
printk("pktgen: cannot create %s procfs entry.\n", t->fname);
Expand Down Expand Up @@ -3064,7 +3053,7 @@ static int __init pg_init(void)

create_proc_dir();

sprintf(module_fname, "net/%s/pgctrl", PG_PROC_DIR);
sprintf(module_fname, "%s/pgctrl", PG_PROC_DIR);
module_proc_ent = create_proc_entry(module_fname, 0600, NULL);
if (!module_proc_ent) {
printk("pktgen: ERROR: cannot create %s procfs entry.\n", module_fname);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ieee80211/ieee80211_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static int __init ieee80211_init(void)
struct proc_dir_entry *e;

ieee80211_debug_level = debug;
ieee80211_proc = create_proc_entry(DRV_NAME, S_IFDIR, proc_net);
ieee80211_proc = proc_mkdir(DRV_NAME, proc_net);
if (ieee80211_proc == NULL) {
IEEE80211_ERROR("Unable to create " DRV_NAME
" proc directory\n");
Expand Down

0 comments on commit 54e85bb

Please sign in to comment.