aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hdpuftrs/hdpu_cpustate.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2007-10-02 16:30:05 -0400
committerPaul Mackerras <paulus@samba.org>2007-10-02 22:02:43 -0400
commita4e32b5f0ac60e6bca7c6896f47e1c624ae45df1 (patch)
tree04ecd93e767acbd6ffc249e4223ef240c8e284c5 /drivers/misc/hdpuftrs/hdpu_cpustate.c
parent8150caad02266623b5b9f58088d589f130fccd97 (diff)
[POWERPC] Sky Cpu and Nexus: code style improvement
Remove useless spaces and adds some empty lines to make code more readable. Also marker for printk is added. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Brian Waite <waite@skycomputers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/misc/hdpuftrs/hdpu_cpustate.c')
-rw-r--r--drivers/misc/hdpuftrs/hdpu_cpustate.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c
index 276ba3c5143f..1874b0740f2b 100644
--- a/drivers/misc/hdpuftrs/hdpu_cpustate.c
+++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c
@@ -169,22 +169,21 @@ static struct platform_driver hdpu_cpustate_driver = {
169 * The various file operations we support. 169 * The various file operations we support.
170 */ 170 */
171static const struct file_operations cpustate_fops = { 171static const struct file_operations cpustate_fops = {
172 owner:THIS_MODULE, 172 owner: THIS_MODULE,
173 open:cpustate_open, 173 open: cpustate_open,
174 release:cpustate_release, 174 release: cpustate_release,
175 read:cpustate_read, 175 read: cpustate_read,
176 write:cpustate_write, 176 write: cpustate_write,
177 fasync:NULL, 177 fasync: NULL,
178 poll:NULL, 178 poll: NULL,
179 ioctl:NULL, 179 ioctl: NULL,
180 llseek:no_llseek, 180 llseek: no_llseek,
181
182}; 181};
183 182
184static struct miscdevice cpustate_dev = { 183static struct miscdevice cpustate_dev = {
185 MISC_DYNAMIC_MINOR, 184 MISC_DYNAMIC_MINOR,
186 "sky_cpustate", 185 "sky_cpustate",
187 &cpustate_fops 186 &cpustate_fops,
188}; 187};
189 188
190static int hdpu_cpustate_probe(struct platform_device *pdev) 189static int hdpu_cpustate_probe(struct platform_device *pdev)
@@ -199,18 +198,18 @@ static int hdpu_cpustate_probe(struct platform_device *pdev)
199 198
200 ret = misc_register(&cpustate_dev); 199 ret = misc_register(&cpustate_dev);
201 if (ret) { 200 if (ret) {
202 printk(KERN_WARNING "sky_cpustate: Unable to register misc " 201 printk(KERN_WARNING "sky_cpustate: "
203 "device.\n"); 202 "Unable to register misc device.\n");
204 cpustate.set_addr = NULL; 203 cpustate.set_addr = NULL;
205 cpustate.clr_addr = NULL; 204 cpustate.clr_addr = NULL;
206 return ret; 205 return ret;
207 } 206 }
208 207
209 proc_de = create_proc_read_entry("sky_cpustate", 0, 0, 208 proc_de = create_proc_read_entry("sky_cpustate", 0, 0,
210 cpustate_read_proc, NULL); 209 cpustate_read_proc, NULL);
211 if (proc_de == NULL) 210 if (proc_de == NULL)
212 printk(KERN_WARNING "sky_cpustate: Unable to create proc " 211 printk(KERN_WARNING "sky_cpustate: "
213 "dir entry\n"); 212 "Unable to create proc dir entry\n");
214 213
215 printk(KERN_INFO "Sky CPU State Driver v" SKY_CPUSTATE_VERSION "\n"); 214 printk(KERN_INFO "Sky CPU State Driver v" SKY_CPUSTATE_VERSION "\n");
216 return 0; 215 return 0;
@@ -218,21 +217,18 @@ static int hdpu_cpustate_probe(struct platform_device *pdev)
218 217
219static int hdpu_cpustate_remove(struct platform_device *pdev) 218static int hdpu_cpustate_remove(struct platform_device *pdev)
220{ 219{
221
222 cpustate.set_addr = NULL; 220 cpustate.set_addr = NULL;
223 cpustate.clr_addr = NULL; 221 cpustate.clr_addr = NULL;
224 222
225 remove_proc_entry("sky_cpustate", NULL); 223 remove_proc_entry("sky_cpustate", NULL);
226 misc_deregister(&cpustate_dev); 224 misc_deregister(&cpustate_dev);
227 return 0;
228 225
226 return 0;
229} 227}
230 228
231static int __init cpustate_init(void) 229static int __init cpustate_init(void)
232{ 230{
233 int rc; 231 return platform_driver_register(&hdpu_cpustate_driver);
234 rc = platform_driver_register(&hdpu_cpustate_driver);
235 return rc;
236} 232}
237 233
238static void __exit cpustate_exit(void) 234static void __exit cpustate_exit(void)