Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: most: aim-cdev/cdev.c. Fix "missing static keyword" warnings

This is a patch to the most/aim_cdev.c file. It makes several
local functions and structures static to prevent global visibility.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Adrian Remonda and committed by
Greg Kroah-Hartman
5132fcd1 23fe15fa

+9 -9
+9 -9
drivers/staging/most/aim-cdev/cdev.c
··· 49 49 static spinlock_t ch_list_lock; 50 50 51 51 52 - struct aim_channel *get_channel(struct most_interface *iface, int id) 52 + static struct aim_channel *get_channel(struct most_interface *iface, int id) 53 53 { 54 54 struct aim_channel *channel, *tmp; 55 55 unsigned long flags; ··· 289 289 * This frees allocated memory and removes the cdev that represents this 290 290 * channel in user space. 291 291 */ 292 - int aim_disconnect_channel(struct most_interface *iface, int channel_id) 292 + static int aim_disconnect_channel(struct most_interface *iface, int channel_id) 293 293 { 294 294 struct aim_channel *channel; 295 295 unsigned long flags; ··· 329 329 * This searches for the channel linked to this MBO and stores it in the local 330 330 * fifo buffer. 331 331 */ 332 - int aim_rx_completion(struct mbo *mbo) 332 + static int aim_rx_completion(struct mbo *mbo) 333 333 { 334 334 struct aim_channel *channel; 335 335 ··· 356 356 * 357 357 * This wakes sleeping processes in the wait-queue. 358 358 */ 359 - int aim_tx_completion(struct most_interface *iface, int channel_id) 359 + static int aim_tx_completion(struct most_interface *iface, int channel_id) 360 360 { 361 361 struct aim_channel *channel; 362 362 ··· 376 376 return 0; 377 377 } 378 378 379 - struct most_aim cdev_aim; 379 + static struct most_aim cdev_aim; 380 380 381 381 /** 382 382 * aim_probe - probe function of the driver module ··· 390 390 * 391 391 * Returns 0 on success or error code otherwise. 392 392 */ 393 - int aim_probe(struct most_interface *iface, int channel_id, 394 - struct most_channel_config *cfg, 395 - struct kobject *parent, char *name) 393 + static int aim_probe(struct most_interface *iface, int channel_id, 394 + struct most_channel_config *cfg, 395 + struct kobject *parent, char *name) 396 396 { 397 397 struct aim_channel *channel; 398 398 unsigned long cl_flags; ··· 463 463 return retval; 464 464 } 465 465 466 - struct most_aim cdev_aim = { 466 + static struct most_aim cdev_aim = { 467 467 .name = "cdev", 468 468 .probe_channel = aim_probe, 469 469 .disconnect_channel = aim_disconnect_channel,