proc.c (dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4) | proc.c (d9dda78bad879595d8c4220a067fc029d6484a16) |
---|---|
1/* 2 * /proc/bus/pnp interface for Plug and Play devices 3 * 4 * Written by David Hinds, dahinds@users.sourceforge.net 5 * Modified by Thomas Hood 6 * 7 * The .../devices and .../<node> and .../boot/<node> files are 8 * utilized by the lspnp and setpnp utilities, supplied with the --- 224 unchanged lines hidden (view full) --- 233 len = node->size - sizeof(struct pnp_bios_node); 234 seq_write(m, node->data, len); 235 kfree(node); 236 return 0; 237} 238 239static int pnpbios_proc_open(struct inode *inode, struct file *file) 240{ | 1/* 2 * /proc/bus/pnp interface for Plug and Play devices 3 * 4 * Written by David Hinds, dahinds@users.sourceforge.net 5 * Modified by Thomas Hood 6 * 7 * The .../devices and .../<node> and .../boot/<node> files are 8 * utilized by the lspnp and setpnp utilities, supplied with the --- 224 unchanged lines hidden (view full) --- 233 len = node->size - sizeof(struct pnp_bios_node); 234 seq_write(m, node->data, len); 235 kfree(node); 236 return 0; 237} 238 239static int pnpbios_proc_open(struct inode *inode, struct file *file) 240{ |
241 return single_open(file, pnpbios_proc_show, PDE(inode)->data); | 241 return single_open(file, pnpbios_proc_show, PDE_DATA(inode)); |
242} 243 244static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf, 245 size_t count, loff_t *pos) 246{ | 242} 243 244static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf, 245 size_t count, loff_t *pos) 246{ |
247 void *data = PDE(file_inode(file))->data; | 247 void *data = PDE_DATA(file_inode(file)); |
248 struct pnp_bios_node *node; 249 int boot = (long)data >> 8; 250 u8 nodenum = (long)data; 251 int ret = count; 252 253 node = kzalloc(node_info.max_node_size, GFP_KERNEL); 254 if (!node) 255 return -ENOMEM; --- 96 unchanged lines hidden --- | 248 struct pnp_bios_node *node; 249 int boot = (long)data >> 8; 250 u8 nodenum = (long)data; 251 int ret = count; 252 253 node = kzalloc(node_info.max_node_size, GFP_KERNEL); 254 if (!node) 255 return -ENOMEM; --- 96 unchanged lines hidden --- |