diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-20 01:36:52 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-20 01:36:52 -0400 |
| commit | 880102e78547c1db158a17e36cf0cdd98e7ad710 (patch) | |
| tree | 3fff9cc54c44dafe275cfabefb96c589e08d971d /drivers/misc | |
| parent | 3d07f0e83d4323d2cd45cc583f7cf1957aca3cac (diff) | |
| parent | 39ab05c8e0b519ff0a04a869f065746e6e8c3d95 (diff) | |
Merge remote branch 'origin/master' into merge
Manual merge of arch/powerpc/kernel/smp.c and add missing scheduler_ipi()
call to arch/powerpc/platforms/cell/interrupt.c
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/ti-st/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/misc/ti-st/st_core.c | 23 | ||||
| -rw-r--r-- | drivers/misc/ti-st/st_kim.c | 1 |
3 files changed, 15 insertions, 11 deletions
diff --git a/drivers/misc/ti-st/Kconfig b/drivers/misc/ti-st/Kconfig index 2c8c3f39710..abb5de1afce 100644 --- a/drivers/misc/ti-st/Kconfig +++ b/drivers/misc/ti-st/Kconfig | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | menu "Texas Instruments shared transport line discipline" | 5 | menu "Texas Instruments shared transport line discipline" |
| 6 | config TI_ST | 6 | config TI_ST |
| 7 | tristate "Shared transport core driver" | 7 | tristate "Shared transport core driver" |
| 8 | depends on RFKILL | 8 | depends on NET && GPIOLIB |
| 9 | select FW_LOADER | 9 | select FW_LOADER |
| 10 | help | 10 | help |
| 11 | This enables the shared transport core driver for TI | 11 | This enables the shared transport core driver for TI |
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index 486117f72c9..f91f82eabda 100644 --- a/drivers/misc/ti-st/st_core.c +++ b/drivers/misc/ti-st/st_core.c | |||
| @@ -43,13 +43,15 @@ static void add_channel_to_table(struct st_data_s *st_gdata, | |||
| 43 | pr_info("%s: id %d\n", __func__, new_proto->chnl_id); | 43 | pr_info("%s: id %d\n", __func__, new_proto->chnl_id); |
| 44 | /* list now has the channel id as index itself */ | 44 | /* list now has the channel id as index itself */ |
| 45 | st_gdata->list[new_proto->chnl_id] = new_proto; | 45 | st_gdata->list[new_proto->chnl_id] = new_proto; |
| 46 | st_gdata->is_registered[new_proto->chnl_id] = true; | ||
| 46 | } | 47 | } |
| 47 | 48 | ||
| 48 | static void remove_channel_from_table(struct st_data_s *st_gdata, | 49 | static void remove_channel_from_table(struct st_data_s *st_gdata, |
| 49 | struct st_proto_s *proto) | 50 | struct st_proto_s *proto) |
| 50 | { | 51 | { |
| 51 | pr_info("%s: id %d\n", __func__, proto->chnl_id); | 52 | pr_info("%s: id %d\n", __func__, proto->chnl_id); |
| 52 | st_gdata->list[proto->chnl_id] = NULL; | 53 | /* st_gdata->list[proto->chnl_id] = NULL; */ |
| 54 | st_gdata->is_registered[proto->chnl_id] = false; | ||
| 53 | } | 55 | } |
| 54 | 56 | ||
| 55 | /* | 57 | /* |
| @@ -104,7 +106,7 @@ void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata) | |||
| 104 | 106 | ||
| 105 | if (unlikely | 107 | if (unlikely |
| 106 | (st_gdata == NULL || st_gdata->rx_skb == NULL | 108 | (st_gdata == NULL || st_gdata->rx_skb == NULL |
| 107 | || st_gdata->list[chnl_id] == NULL)) { | 109 | || st_gdata->is_registered[chnl_id] == false)) { |
| 108 | pr_err("chnl_id %d not registered, no data to send?", | 110 | pr_err("chnl_id %d not registered, no data to send?", |
| 109 | chnl_id); | 111 | chnl_id); |
| 110 | kfree_skb(st_gdata->rx_skb); | 112 | kfree_skb(st_gdata->rx_skb); |
| @@ -141,14 +143,15 @@ void st_reg_complete(struct st_data_s *st_gdata, char err) | |||
| 141 | unsigned char i = 0; | 143 | unsigned char i = 0; |
| 142 | pr_info(" %s ", __func__); | 144 | pr_info(" %s ", __func__); |
| 143 | for (i = 0; i < ST_MAX_CHANNELS; i++) { | 145 | for (i = 0; i < ST_MAX_CHANNELS; i++) { |
| 144 | if (likely(st_gdata != NULL && st_gdata->list[i] != NULL && | 146 | if (likely(st_gdata != NULL && |
| 145 | st_gdata->list[i]->reg_complete_cb != NULL)) { | 147 | st_gdata->is_registered[i] == true && |
| 148 | st_gdata->list[i]->reg_complete_cb != NULL)) { | ||
| 146 | st_gdata->list[i]->reg_complete_cb | 149 | st_gdata->list[i]->reg_complete_cb |
| 147 | (st_gdata->list[i]->priv_data, err); | 150 | (st_gdata->list[i]->priv_data, err); |
| 148 | pr_info("protocol %d's cb sent %d\n", i, err); | 151 | pr_info("protocol %d's cb sent %d\n", i, err); |
| 149 | if (err) { /* cleanup registered protocol */ | 152 | if (err) { /* cleanup registered protocol */ |
| 150 | st_gdata->protos_registered--; | 153 | st_gdata->protos_registered--; |
| 151 | st_gdata->list[i] = NULL; | 154 | st_gdata->is_registered[i] = false; |
| 152 | } | 155 | } |
| 153 | } | 156 | } |
| 154 | } | 157 | } |
| @@ -475,9 +478,9 @@ void kim_st_list_protocols(struct st_data_s *st_gdata, void *buf) | |||
| 475 | { | 478 | { |
| 476 | seq_printf(buf, "[%d]\nBT=%c\nFM=%c\nGPS=%c\n", | 479 | seq_printf(buf, "[%d]\nBT=%c\nFM=%c\nGPS=%c\n", |
| 477 | st_gdata->protos_registered, | 480 | st_gdata->protos_registered, |
| 478 | st_gdata->list[0x04] != NULL ? 'R' : 'U', | 481 | st_gdata->is_registered[0x04] == true ? 'R' : 'U', |
| 479 | st_gdata->list[0x08] != NULL ? 'R' : 'U', | 482 | st_gdata->is_registered[0x08] == true ? 'R' : 'U', |
| 480 | st_gdata->list[0x09] != NULL ? 'R' : 'U'); | 483 | st_gdata->is_registered[0x09] == true ? 'R' : 'U'); |
| 481 | } | 484 | } |
| 482 | 485 | ||
| 483 | /********************************************************************/ | 486 | /********************************************************************/ |
| @@ -504,7 +507,7 @@ long st_register(struct st_proto_s *new_proto) | |||
| 504 | return -EPROTONOSUPPORT; | 507 | return -EPROTONOSUPPORT; |
| 505 | } | 508 | } |
| 506 | 509 | ||
| 507 | if (st_gdata->list[new_proto->chnl_id] != NULL) { | 510 | if (st_gdata->is_registered[new_proto->chnl_id] == true) { |
| 508 | pr_err("chnl_id %d already registered", new_proto->chnl_id); | 511 | pr_err("chnl_id %d already registered", new_proto->chnl_id); |
| 509 | return -EALREADY; | 512 | return -EALREADY; |
| 510 | } | 513 | } |
| @@ -563,7 +566,7 @@ long st_register(struct st_proto_s *new_proto) | |||
| 563 | /* check for already registered once more, | 566 | /* check for already registered once more, |
| 564 | * since the above check is old | 567 | * since the above check is old |
| 565 | */ | 568 | */ |
| 566 | if (st_gdata->list[new_proto->chnl_id] != NULL) { | 569 | if (st_gdata->is_registered[new_proto->chnl_id] == true) { |
| 567 | pr_err(" proto %d already registered ", | 570 | pr_err(" proto %d already registered ", |
| 568 | new_proto->chnl_id); | 571 | new_proto->chnl_id); |
| 569 | return -EALREADY; | 572 | return -EALREADY; |
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index b4488c8f6b2..5da93ee6f6b 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/debugfs.h> | 30 | #include <linux/debugfs.h> |
| 31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
| 32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
| 33 | #include <linux/sysfs.h> | ||
| 33 | #include <linux/tty.h> | 34 | #include <linux/tty.h> |
| 34 | 35 | ||
| 35 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
