提交 cf9673da 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

staging: mei: rename num_mei_me_clients to me_clients_num

Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NOren Weil <oren.jer.weil@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a93218e1
......@@ -317,7 +317,7 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
dev->extra_write_index = 0;
}
dev->num_mei_me_clients = 0;
dev->me_clients_num = 0;
dev->rd_msg_hdr = 0;
dev->stop = false;
dev->wd_pending = false;
......@@ -443,9 +443,9 @@ void mei_allocate_me_clients_storage(struct mei_device *dev)
/* count how many ME clients we have */
for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX)
dev->num_mei_me_clients++;
dev->me_clients_num++;
if (dev->num_mei_me_clients <= 0)
if (dev->me_clients_num <= 0)
return ;
......@@ -454,9 +454,9 @@ void mei_allocate_me_clients_storage(struct mei_device *dev)
dev->me_clients = NULL;
}
dev_dbg(&dev->pdev->dev, "memory allocation for ME clients size=%zd.\n",
dev->num_mei_me_clients * sizeof(struct mei_me_client));
dev->me_clients_num * sizeof(struct mei_me_client));
/* allocate storage for ME clients representation */
clients = kcalloc(dev->num_mei_me_clients,
clients = kcalloc(dev->me_clients_num,
sizeof(struct mei_me_client), GFP_KERNEL);
if (!clients) {
dev_dbg(&dev->pdev->dev, "memory allocation for ME clients failed.\n");
......@@ -550,7 +550,7 @@ int mei_find_me_client_index(const struct mei_device *dev, uuid_le cuuid)
{
int i, res = -1;
for (i = 0; i < dev->num_mei_me_clients; ++i)
for (i = 0; i < dev->me_clients_num; ++i)
if (uuid_le_cmp(cuuid,
dev->me_clients[i].props.protocol_name) == 0) {
res = i;
......
......@@ -255,13 +255,13 @@ int mei_flow_ctrl_creds(struct mei_device *dev, struct mei_cl *cl)
{
int i;
if (!dev->num_mei_me_clients)
if (!dev->me_clients_num)
return 0;
if (cl->mei_flow_ctrl_creds > 0)
return 1;
for (i = 0; i < dev->num_mei_me_clients; i++) {
for (i = 0; i < dev->me_clients_num; i++) {
struct mei_me_client *me_cl = &dev->me_clients[i];
if (me_cl->client_id == cl->me_client_id) {
if (me_cl->mei_flow_ctrl_creds) {
......@@ -290,10 +290,10 @@ int mei_flow_ctrl_reduce(struct mei_device *dev, struct mei_cl *cl)
{
int i;
if (!dev->num_mei_me_clients)
if (!dev->me_clients_num)
return -ENOENT;
for (i = 0; i < dev->num_mei_me_clients; i++) {
for (i = 0; i < dev->me_clients_num; i++) {
struct mei_me_client *me_cl = &dev->me_clients[i];
if (me_cl->client_id == cl->me_client_id) {
if (me_cl->props.single_recv_buf != 0) {
......
......@@ -499,7 +499,7 @@ static void add_single_flow_creds(struct mei_device *dev,
struct mei_me_client *client;
int i;
for (i = 0; i < dev->num_mei_me_clients; i++) {
for (i = 0; i < dev->me_clients_num; i++) {
client = &dev->me_clients[i];
if (client && flow->me_addr == client->client_id) {
if (client->props.single_recv_buf) {
......
......@@ -277,13 +277,13 @@ int amthi_read(struct mei_device *dev, struct file *file,
return -ETIMEDOUT;
}
for (i = 0; i < dev->num_mei_me_clients; i++) {
for (i = 0; i < dev->me_clients_num; i++) {
if (dev->me_clients[i].client_id ==
dev->iamthif_cl.me_client_id)
break;
}
if (i == dev->num_mei_me_clients) {
if (i == dev->me_clients_num) {
dev_dbg(&dev->pdev->dev, "amthi client not found.\n");
return -ENODEV;
}
......@@ -409,7 +409,7 @@ int mei_start_read(struct mei_device *dev, struct mei_cl *cl)
dev_dbg(&dev->pdev->dev, "allocation call back successful. host client = %d, ME client = %d\n",
cl->host_client_id, cl->me_client_id);
for (i = 0; i < dev->num_mei_me_clients; i++) {
for (i = 0; i < dev->me_clients_num; i++) {
if (dev->me_clients[i].client_id == cl->me_client_id)
break;
......@@ -420,7 +420,7 @@ int mei_start_read(struct mei_device *dev, struct mei_cl *cl)
goto unlock;
}
if (i == dev->num_mei_me_clients) {
if (i == dev->me_clients_num) {
rets = -ENODEV;
goto unlock;
}
......
......@@ -240,7 +240,7 @@ static void __devexit mei_remove(struct pci_dev *pdev)
mei_remove_client_from_file_list(dev, dev->iamthif_cl.host_client_id);
dev->iamthif_current_cb = NULL;
dev->num_mei_me_clients = 0;
dev->me_clients_num = 0;
mutex_unlock(&dev->device_lock);
......@@ -800,7 +800,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
rets = -ENODEV;
goto unlock_dev;
}
for (i = 0; i < dev->num_mei_me_clients; i++) {
for (i = 0; i < dev->me_clients_num; i++) {
if (dev->me_clients[i].client_id ==
dev->iamthif_cl.me_client_id)
break;
......@@ -810,7 +810,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
rets = -ENODEV;
goto unlock_dev;
}
if (i == dev->num_mei_me_clients ||
if (i == dev->me_clients_num ||
(dev->me_clients[i].client_id !=
dev->iamthif_cl.me_client_id)) {
rets = -ENODEV;
......@@ -868,7 +868,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
cl->me_client_id);
goto unlock_dev;
}
for (i = 0; i < dev->num_mei_me_clients; i++) {
for (i = 0; i < dev->me_clients_num; i++) {
if (dev->me_clients[i].client_id ==
cl->me_client_id)
break;
......@@ -877,7 +877,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
rets = -ENODEV;
goto unlock_dev;
}
if (i == dev->num_mei_me_clients) {
if (i == dev->me_clients_num) {
rets = -ENODEV;
goto unlock_dev;
}
......
......@@ -236,7 +236,7 @@ struct mei_device {
struct mei_me_client *me_clients; /* Note: memory has to be allocated */
DECLARE_BITMAP(me_clients_map, MEI_CLIENTS_MAX);
DECLARE_BITMAP(host_clients_map, MEI_CLIENTS_MAX);
u8 num_mei_me_clients;
u8 me_clients_num;
u8 me_client_presentation_num;
u8 me_client_index;
bool mei_host_buffer_is_empty;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册