diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2011-05-25 17:28:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 13:20:32 -0700 |
commit | c95efb741f1db9c804a582a3ba52413b9cbd8f7f (patch) | |
tree | 04c118116995e16e9ad87f408c728a01db1ea911 | |
parent | 106fb49f72602470bae3c83d1899156768219aa2 (diff) |
staging: mei: fix mei driver namespace
All global functions must start with mei_ to reduce the risk of name colisions
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/mei/init.c | 28 | ||||
-rw-r--r-- | drivers/staging/mei/interrupt.c | 18 | ||||
-rw-r--r-- | drivers/staging/mei/iorw.c | 2 | ||||
-rw-r--r-- | drivers/staging/mei/main.c | 8 | ||||
-rw-r--r-- | drivers/staging/mei/mei_dev.h | 34 | ||||
-rw-r--r-- | drivers/staging/mei/wd.c | 8 |
6 files changed, 54 insertions, 44 deletions
diff --git a/drivers/staging/mei/init.c b/drivers/staging/mei/init.c index d1ffa32cd141..4492bc3bf331 100644 --- a/drivers/staging/mei/init.c +++ b/drivers/staging/mei/init.c @@ -119,7 +119,7 @@ static void mei_reset_iamthif_params(struct mei_device *dev) * * returns The mei_device_device pointer on success, NULL on failure. */ -struct mei_device *init_mei_device(struct pci_dev *pdev) +struct mei_device *mei_device_init(struct pci_dev *pdev) { int i; struct mei_device *dev; @@ -363,7 +363,7 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) * * returns none. */ -void host_start_message(struct mei_device *dev) +void mei_host_start_message(struct mei_device *dev) { struct mei_msg_hdr *mei_hdr; struct hbm_host_version_request *host_start_req; @@ -402,7 +402,7 @@ void host_start_message(struct mei_device *dev) * * returns none. */ -void host_enum_clients_message(struct mei_device *dev) +void mei_host_enum_clients_message(struct mei_device *dev) { struct mei_msg_hdr *mei_hdr; struct hbm_host_enum_request *host_enum_req; @@ -437,7 +437,7 @@ void host_enum_clients_message(struct mei_device *dev) * * returns none. */ -void allocate_me_clients_storage(struct mei_device *dev) +void mei_allocate_me_clients_storage(struct mei_device *dev) { struct mei_me_client *clients; int b; @@ -475,7 +475,7 @@ void allocate_me_clients_storage(struct mei_device *dev) * * returns none. */ -void host_client_properties(struct mei_device *dev) +void mei_host_client_properties(struct mei_device *dev) { struct mei_msg_hdr *mei_header; struct hbm_props_request *host_cli_req; @@ -536,7 +536,7 @@ void host_client_properties(struct mei_device *dev) * @priv: private file structure to be initialized * @file: the file structure */ -void mei_init_file_private(struct mei_cl *priv, struct mei_device *dev) +void mei_cl_init(struct mei_cl *priv, struct mei_device *dev) { memset(priv, 0, sizeof(struct mei_cl)); init_waitqueue_head(&priv->wait); @@ -601,12 +601,12 @@ u8 mei_find_me_client_update_filext(struct mei_device *dev, struct mei_cl *priv, * @dev: the device structure * */ -void host_init_iamthif(struct mei_device *dev) +void mei_host_init_iamthif(struct mei_device *dev) { u8 i; unsigned char *msg_buf; - mei_init_file_private(&dev->iamthif_cl, dev); + mei_cl_init(&dev->iamthif_cl, dev); dev->iamthif_cl.state = MEI_FILE_DISCONNECTED; /* find ME amthi client */ @@ -656,17 +656,17 @@ void host_init_iamthif(struct mei_device *dev) * * returns The allocated file or NULL on failure */ -struct mei_cl *mei_alloc_file_private(struct mei_device *dev) +struct mei_cl *mei_cl_allocate(struct mei_device *dev) { - struct mei_cl *priv; + struct mei_cl *cl; - priv = kmalloc(sizeof(struct mei_cl), GFP_KERNEL); - if (!priv) + cl = kmalloc(sizeof(struct mei_cl), GFP_KERNEL); + if (!cl) return NULL; - mei_init_file_private(priv, dev); + mei_cl_init(cl, dev); - return priv; + return cl; } diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c index d1b9214c10c7..058079df4173 100644 --- a/drivers/staging/mei/interrupt.c +++ b/drivers/staging/mei/interrupt.c @@ -94,7 +94,7 @@ static void _mei_cmpl_iamthif(struct mei_device *dev, struct mei_cl_cb *cb_pos) dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n", dev->iamthif_timer); } else { - run_next_iamthif_cmd(dev); + mei_run_next_iamthif_cmd(dev); } dev_dbg(&dev->pdev->dev, "completing amthi call back.\n"); @@ -396,7 +396,7 @@ static void mei_client_connect_response(struct mei_device *dev, dev->wd_due_counter = (dev->wd_timeout) ? 1 : 0; dev_dbg(&dev->pdev->dev, "successfully connected to WD client.\n"); - host_init_iamthif(dev); + mei_host_init_iamthif(dev); return; } @@ -659,7 +659,7 @@ static void mei_irq_thread_read_bus_message(struct mei_device *dev, if (dev->mei_state == MEI_INIT_CLIENTS && dev->init_clients_state == MEI_START_MESSAGE) { dev->init_clients_timer = 0; - host_enum_clients_message(dev); + mei_host_enum_clients_message(dev); } else { dev->recvd_msg = 0; dev_dbg(&dev->pdev->dev, "IMEI reset due to received host start response bus message.\n"); @@ -734,7 +734,7 @@ static void mei_irq_thread_read_bus_message(struct mei_device *dev, MEI_CLIENT_PROPERTIES_MESSAGE) { dev->me_client_index++; dev->me_client_presentation_num++; - host_client_properties(dev); + mei_host_client_properties(dev); } else { dev_dbg(&dev->pdev->dev, "reset due to received host client properties response bus message"); mei_reset(dev, 1); @@ -755,10 +755,10 @@ static void mei_irq_thread_read_bus_message(struct mei_device *dev, dev->init_clients_timer = 0; dev->me_client_presentation_num = 0; dev->me_client_index = 0; - allocate_me_clients_storage(dev); + mei_allocate_me_clients_storage(dev); dev->init_clients_state = MEI_CLIENT_PROPERTIES_MESSAGE; - host_client_properties(dev); + mei_host_client_properties(dev); } else { dev_dbg(&dev->pdev->dev, "reset due to received host enumeration clients response bus message.\n"); mei_reset(dev, 1); @@ -1462,7 +1462,7 @@ void mei_wd_timer(struct work_struct *work) dev->iamthif_file_object = NULL; dev->iamthif_current_cb = NULL; - run_next_iamthif_cmd(dev); + mei_run_next_iamthif_cmd(dev); } } @@ -1506,7 +1506,7 @@ void mei_wd_timer(struct work_struct *work) dev->iamthif_file_object = NULL; dev->iamthif_current_cb = NULL; dev->iamthif_timer = 0; - run_next_iamthif_cmd(dev); + mei_run_next_iamthif_cmd(dev); } } @@ -1564,7 +1564,7 @@ irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id) /* link is established * start sending messages. */ - host_start_message(dev); + mei_host_start_message(dev); mutex_unlock(&dev->device_lock); return IRQ_HANDLED; } else { diff --git a/drivers/staging/mei/iorw.c b/drivers/staging/mei/iorw.c index 697a2773d7cd..3adc6b11445e 100644 --- a/drivers/staging/mei/iorw.c +++ b/drivers/staging/mei/iorw.c @@ -547,7 +547,7 @@ int amthi_write(struct mei_device *dev, struct mei_cl_cb *cb) * * returns 0 on success, <0 on failure. */ -void run_next_iamthif_cmd(struct mei_device *dev) +void mei_run_next_iamthif_cmd(struct mei_device *dev) { struct mei_cl *cl_tmp; struct mei_cl_cb *cb_pos = NULL; diff --git a/drivers/staging/mei/main.c b/drivers/staging/mei/main.c index bfd1b46ec748..210aa8e49ba5 100644 --- a/drivers/staging/mei/main.c +++ b/drivers/staging/mei/main.c @@ -142,7 +142,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, goto disable_device; } /* allocates and initializes the mei dev structure */ - dev = init_mei_device(pdev); + dev = mei_device_init(pdev); if (!dev) { err = -ENOMEM; goto release_regions; @@ -407,7 +407,7 @@ static int mei_open(struct inode *inode, struct file *file) mutex_lock(&dev->device_lock); err = -ENOMEM; - cl = mei_alloc_file_private(dev); + cl = mei_cl_allocate(dev); if (!cl) goto out; @@ -522,7 +522,7 @@ static int mei_release(struct inode *inode, struct file *file) dev->iamthif_canceled = 1; if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE) { dev_dbg(&dev->pdev->dev, "run next amthi iamthif cb\n"); - run_next_iamthif_cmd(dev); + mei_run_next_iamthif_cmd(dev); } } @@ -1066,7 +1066,7 @@ static unsigned int mei_poll(struct file *file, poll_table *wait) dev->iamthif_file_object == file) { mask |= (POLLIN | POLLRDNORM); dev_dbg(&dev->pdev->dev, "run next amthi cb\n"); - run_next_iamthif_cmd(dev); + mei_run_next_iamthif_cmd(dev); } goto out; } diff --git a/drivers/staging/mei/mei_dev.h b/drivers/staging/mei/mei_dev.h index 30590803fec5..5613ddf2b015 100644 --- a/drivers/staging/mei/mei_dev.h +++ b/drivers/staging/mei/mei_dev.h @@ -273,38 +273,48 @@ struct mei_device { /* * mei init function prototypes */ -struct mei_device *init_mei_device(struct pci_dev *pdev); +struct mei_device *mei_device_init(struct pci_dev *pdev); void mei_reset(struct mei_device *dev, int interrupts); int mei_hw_init(struct mei_device *dev); int mei_task_initialize_clients(void *data); int mei_initialize_clients(struct mei_device *dev); -struct mei_cl *mei_alloc_file_private(struct mei_device *dev); int mei_disconnect_host_client(struct mei_device *dev, struct mei_cl *cl); void mei_initialize_list(struct mei_io_list *list, struct mei_device *dev); void mei_flush_list(struct mei_io_list *list, struct mei_cl *cl); void mei_flush_queues(struct mei_device *dev, struct mei_cl *cl); void mei_remove_client_from_file_list(struct mei_device *dev, u8 host_client_id); -void host_init_iamthif(struct mei_device *dev); -void mei_init_file_private(struct mei_cl *priv, struct mei_device *dev); -void allocate_me_clients_storage(struct mei_device *dev); +void mei_host_init_iamthif(struct mei_device *dev); +void mei_allocate_me_clients_storage(struct mei_device *dev); -void host_start_message(struct mei_device *dev); -void host_enum_clients_message(struct mei_device *dev); -void host_client_properties(struct mei_device *dev); u8 mei_find_me_client_update_filext(struct mei_device *dev, struct mei_cl *priv, const uuid_le *cguid, u8 client_id); /* - * interrupt functions prototype + * MEI ME Client Functions + */ + +struct mei_cl *mei_cl_allocate(struct mei_device *dev); +void mei_cl_init(struct mei_cl *priv, struct mei_device *dev); + + +/* + * MEI Host Client Functions + */ +void mei_host_start_message(struct mei_device *dev); +void mei_host_enum_clients_message(struct mei_device *dev); +void mei_host_client_properties(struct mei_device *dev); + +/* + * MEI interrupt functions prototype */ irqreturn_t mei_interrupt_quick_handler(int irq, void *dev_id); -irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id); +irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id); void mei_wd_timer(struct work_struct *work); /* - * input output function prototype + * MEI input output function prototype */ int mei_ioctl_connect_client(struct file *file, struct mei_connect_client_data *data); @@ -319,7 +329,7 @@ int amthi_read(struct mei_device *dev, struct file *file, struct mei_cl_cb *find_amthi_read_list_entry(struct mei_device *dev, struct file *file); -void run_next_iamthif_cmd(struct mei_device *dev); +void mei_run_next_iamthif_cmd(struct mei_device *dev); void mei_free_cb_private(struct mei_cl_cb *priv_cb); diff --git a/drivers/staging/mei/wd.c b/drivers/staging/mei/wd.c index 2564b038636a..2566ee1bc6b6 100644 --- a/drivers/staging/mei/wd.c +++ b/drivers/staging/mei/wd.c @@ -65,7 +65,7 @@ void mei_wd_start_setup(struct mei_device *dev) */ void mei_wd_host_init(struct mei_device *dev) { - mei_init_file_private(&dev->wd_cl, dev); + mei_cl_init(&dev->wd_cl, dev); /* look for WD client and connect to it */ dev->wd_cl.state = MEI_FILE_DISCONNECTED; @@ -83,18 +83,18 @@ void mei_wd_host_init(struct mei_device *dev) dev_dbg(&dev->pdev->dev, "Failed to connect to WD client\n"); dev->wd_cl.state = MEI_FILE_DISCONNECTED; dev->wd_cl.host_client_id = 0; - host_init_iamthif(dev) ; + mei_host_init_iamthif(dev) ; } else { dev->wd_cl.timer_count = CONNECT_TIMEOUT; } } else { dev_dbg(&dev->pdev->dev, "Failed to find WD client\n"); - host_init_iamthif(dev) ; + mei_host_init_iamthif(dev) ; } } else { dev->wd_bypass = true; dev_dbg(&dev->pdev->dev, "WD requested to be disabled\n"); - host_init_iamthif(dev) ; + mei_host_init_iamthif(dev) ; } } |