Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259547
b: refs/heads/master
c: cf9673d
h: refs/heads/master
i:
  259545: 98b5cd4
  259543: 814765f
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent a4172b7 commit 1d513f5
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a93218e14c50e89c1846a8b7849c79b78f58be87
refs/heads/master: cf9673dad4dd76ecdccd265809921ceed752f19e
12 changes: 6 additions & 6 deletions trunk/drivers/staging/mei/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ;


Expand All @@ -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");
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/mei/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/mei/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/mei/iorw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/mei/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/mei/mei_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1d513f5

Please sign in to comment.