From: Andrew Morton - make countports static - no need to initialise it to zero - make it fit in 80 cols - simplify the parport_pc_exit() loop Cc: Jason Dravet Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/parport/parport_pc.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff -puN drivers/parport/parport_pc.c~add-udev-support-to-parport_pc-tidy drivers/parport/parport_pc.c --- devel/drivers/parport/parport_pc.c~add-udev-support-to-parport_pc-tidy 2006-01-04 02:25:31.000000000 -0800 +++ devel-akpm/drivers/parport/parport_pc.c 2006-01-04 02:25:31.000000000 -0800 @@ -102,7 +102,7 @@ static struct superio_struct { /* For Su } superios[NR_SUPERIOS] __devinitdata = { {0,},}; static struct class *parallel_class; -int countports = 0; +static int countports; static int user_specified; #if defined(CONFIG_PARPORT_PC_SUPERIO) || \ @@ -2238,8 +2238,10 @@ struct parport *parport_pc_probe_port (u p->dma = PARPORT_DMA_NONE; parallel_class = class_create(THIS_MODULE, "lp"); - class_device_create(parallel_class, NULL, MKDEV(6, countports), NULL, "lp%i", countports); - class_device_create(parallel_class, NULL, MKDEV(99, countports), NULL, "parport%i", countports); + class_device_create(parallel_class, NULL, MKDEV(6, countports), NULL, + "lp%i", countports); + class_device_create(parallel_class, NULL, MKDEV(99, countports), NULL, + "parport%i", countports); countports++; #ifdef CONFIG_PARPORT_PC_FIFO @@ -3416,7 +3418,7 @@ static void __exit parport_pc_exit(void) if (pnp_registered_parport) pnp_unregister_driver (&parport_pc_pnp_driver); - for (countports--; countports >=0; countports--) { + while (countports--) { class_device_destroy(parallel_class, MKDEV(99, countports)); class_device_destroy(parallel_class, MKDEV(6, countports)); } _