alignment.c (dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4) | alignment.c (d9dda78bad879595d8c4220a067fc029d6484a16) |
---|---|
1/* 2 * Alignment access counters and corresponding user-space interfaces. 3 * 4 * Copyright (C) 2009 ST Microelectronics 5 * Copyright (C) 2009 - 2010 Paul Mundt 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file "COPYING" in the main directory of this archive --- 126 unchanged lines hidden (view full) --- 135static int alignment_proc_open(struct inode *inode, struct file *file) 136{ 137 return single_open(file, alignment_proc_show, NULL); 138} 139 140static ssize_t alignment_proc_write(struct file *file, 141 const char __user *buffer, size_t count, loff_t *pos) 142{ | 1/* 2 * Alignment access counters and corresponding user-space interfaces. 3 * 4 * Copyright (C) 2009 ST Microelectronics 5 * Copyright (C) 2009 - 2010 Paul Mundt 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file "COPYING" in the main directory of this archive --- 126 unchanged lines hidden (view full) --- 135static int alignment_proc_open(struct inode *inode, struct file *file) 136{ 137 return single_open(file, alignment_proc_show, NULL); 138} 139 140static ssize_t alignment_proc_write(struct file *file, 141 const char __user *buffer, size_t count, loff_t *pos) 142{ |
143 int *data = PDE(file_inode(file))->data; | 143 int *data = PDE_DATA(file_inode(file)); |
144 char mode; 145 146 if (count > 0) { 147 if (get_user(mode, buffer)) 148 return -EFAULT; 149 if (mode >= '0' && mode <= '5') 150 *data = mode - '0'; 151 } --- 39 unchanged lines hidden --- | 144 char mode; 145 146 if (count > 0) { 147 if (get_user(mode, buffer)) 148 return -EFAULT; 149 if (mode >= '0' && mode <= '5') 150 *data = mode - '0'; 151 } --- 39 unchanged lines hidden --- |