提交 92258063 编写于 作者: M Marcel Holtmann

[Bluetooth] Fix firmware loading problem of BT3C driver

Before the PCMCIA subsystem was fully integrated into the device and
driver model, the BT3C driver had to workaround this when loading the
firmware. This workaround is broken and makes the driver oops when
loading the firmware. This patch removes this workaround and uses now
the provided device structure from the PCMCIA subsystem.
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 7b005bd3
...@@ -474,18 +474,6 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long ...@@ -474,18 +474,6 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
static struct device *bt3c_device(void)
{
static struct device dev = {
.bus_id = "pcmcia",
};
kobject_set_name(&dev.kobj, "bt3c");
kobject_init(&dev.kobj);
return &dev;
}
static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int count) static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int count)
{ {
char *ptr = (char *) firmware; char *ptr = (char *) firmware;
...@@ -574,6 +562,7 @@ static int bt3c_open(bt3c_info_t *info) ...@@ -574,6 +562,7 @@ static int bt3c_open(bt3c_info_t *info)
{ {
const struct firmware *firmware; const struct firmware *firmware;
struct hci_dev *hdev; struct hci_dev *hdev;
client_handle_t handle;
int err; int err;
spin_lock_init(&(info->lock)); spin_lock_init(&(info->lock));
...@@ -605,8 +594,10 @@ static int bt3c_open(bt3c_info_t *info) ...@@ -605,8 +594,10 @@ static int bt3c_open(bt3c_info_t *info)
hdev->owner = THIS_MODULE; hdev->owner = THIS_MODULE;
handle = info->link.handle;
/* Load firmware */ /* Load firmware */
err = request_firmware(&firmware, "BT3CPCC.bin", bt3c_device()); err = request_firmware(&firmware, "BT3CPCC.bin", &handle_to_dev(handle));
if (err < 0) { if (err < 0) {
BT_ERR("Firmware request failed"); BT_ERR("Firmware request failed");
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册