Commit df44f531 authored by Ondrej Zary's avatar Ondrej Zary Committed by Marcel Holtmann

Bluetooth: bluecard: Always enable LEDs (fix for Anycom CF-300)

Anycom CF-300 (HP C8249A) has both power and activity LEDs.
However the id read in bluecard_open() is 0x73 so the driver does not
enable the LEDs.
Remove the CARD_HAS_PCCARD_ID check to enable LEDs.
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 1afec92b
...@@ -160,9 +160,6 @@ static void bluecard_activity_led_timeout(u_long arg) ...@@ -160,9 +160,6 @@ static void bluecard_activity_led_timeout(u_long arg)
struct bluecard_info *info = (struct bluecard_info *)arg; struct bluecard_info *info = (struct bluecard_info *)arg;
unsigned int iobase = info->p_dev->resource[0]->start; unsigned int iobase = info->p_dev->resource[0]->start;
if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
return;
if (test_bit(CARD_HAS_ACTIVITY_LED, &(info->hw_state))) { if (test_bit(CARD_HAS_ACTIVITY_LED, &(info->hw_state))) {
/* Disable activity LED */ /* Disable activity LED */
outb(0x08 | 0x20, iobase + 0x30); outb(0x08 | 0x20, iobase + 0x30);
...@@ -177,9 +174,6 @@ static void bluecard_enable_activity_led(struct bluecard_info *info) ...@@ -177,9 +174,6 @@ static void bluecard_enable_activity_led(struct bluecard_info *info)
{ {
unsigned int iobase = info->p_dev->resource[0]->start; unsigned int iobase = info->p_dev->resource[0]->start;
if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
return;
if (test_bit(CARD_HAS_ACTIVITY_LED, &(info->hw_state))) { if (test_bit(CARD_HAS_ACTIVITY_LED, &(info->hw_state))) {
/* Enable activity LED */ /* Enable activity LED */
outb(0x10 | 0x40, iobase + 0x30); outb(0x10 | 0x40, iobase + 0x30);
...@@ -625,16 +619,13 @@ static int bluecard_hci_flush(struct hci_dev *hdev) ...@@ -625,16 +619,13 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
static int bluecard_hci_open(struct hci_dev *hdev) static int bluecard_hci_open(struct hci_dev *hdev)
{ {
struct bluecard_info *info = hci_get_drvdata(hdev); struct bluecard_info *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;
if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE); bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
unsigned int iobase = info->p_dev->resource[0]->start;
/* Enable LED */ /* Enable LED */
outb(0x08 | 0x20, iobase + 0x30); outb(0x08 | 0x20, iobase + 0x30);
}
return 0; return 0;
} }
...@@ -643,15 +634,12 @@ static int bluecard_hci_open(struct hci_dev *hdev) ...@@ -643,15 +634,12 @@ static int bluecard_hci_open(struct hci_dev *hdev)
static int bluecard_hci_close(struct hci_dev *hdev) static int bluecard_hci_close(struct hci_dev *hdev)
{ {
struct bluecard_info *info = hci_get_drvdata(hdev); struct bluecard_info *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;
bluecard_hci_flush(hdev); bluecard_hci_flush(hdev);
if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
unsigned int iobase = info->p_dev->resource[0]->start;
/* Disable LED */ /* Disable LED */
outb(0x00, iobase + 0x30); outb(0x00, iobase + 0x30);
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment