Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f5dd8071
Commit
f5dd8071
authored
Aug 20, 2018
by
Jiri Kosina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-4.19/intel-ish' into for-linus
Device-specific fixes for hid-intel-ish
parents
4435b577
50fa9259
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
drivers/hid/intel-ish-hid/ipc/ipc.c
drivers/hid/intel-ish-hid/ipc/ipc.c
+6
-3
drivers/hid/intel-ish-hid/ipc/pci-ish.c
drivers/hid/intel-ish-hid/ipc/pci-ish.c
+11
-2
No files found.
drivers/hid/intel-ish-hid/ipc/ipc.c
View file @
f5dd8071
...
@@ -907,8 +907,9 @@ struct ishtp_device *ish_dev_init(struct pci_dev *pdev)
...
@@ -907,8 +907,9 @@ struct ishtp_device *ish_dev_init(struct pci_dev *pdev)
struct
ishtp_device
*
dev
;
struct
ishtp_device
*
dev
;
int
i
;
int
i
;
dev
=
kzalloc
(
sizeof
(
struct
ishtp_device
)
+
sizeof
(
struct
ish_hw
),
dev
=
devm_kzalloc
(
&
pdev
->
dev
,
GFP_KERNEL
);
sizeof
(
struct
ishtp_device
)
+
sizeof
(
struct
ish_hw
),
GFP_KERNEL
);
if
(
!
dev
)
if
(
!
dev
)
return
NULL
;
return
NULL
;
...
@@ -925,7 +926,9 @@ struct ishtp_device *ish_dev_init(struct pci_dev *pdev)
...
@@ -925,7 +926,9 @@ struct ishtp_device *ish_dev_init(struct pci_dev *pdev)
for
(
i
=
0
;
i
<
IPC_TX_FIFO_SIZE
;
++
i
)
{
for
(
i
=
0
;
i
<
IPC_TX_FIFO_SIZE
;
++
i
)
{
struct
wr_msg_ctl_info
*
tx_buf
;
struct
wr_msg_ctl_info
*
tx_buf
;
tx_buf
=
kzalloc
(
sizeof
(
struct
wr_msg_ctl_info
),
GFP_KERNEL
);
tx_buf
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
struct
wr_msg_ctl_info
),
GFP_KERNEL
);
if
(
!
tx_buf
)
{
if
(
!
tx_buf
)
{
/*
/*
* IPC buffers may be limited or not available
* IPC buffers may be limited or not available
...
...
drivers/hid/intel-ish-hid/ipc/pci-ish.c
View file @
f5dd8071
...
@@ -95,6 +95,13 @@ static int ish_init(struct ishtp_device *dev)
...
@@ -95,6 +95,13 @@ static int ish_init(struct ishtp_device *dev)
return
0
;
return
0
;
}
}
static
const
struct
pci_device_id
ish_invalid_pci_ids
[]
=
{
/* Mehlow platform special pci ids */
{
PCI_DEVICE
(
PCI_VENDOR_ID_INTEL
,
0xA309
)},
{
PCI_DEVICE
(
PCI_VENDOR_ID_INTEL
,
0xA30A
)},
{}
};
/**
/**
* ish_probe() - PCI driver probe callback
* ish_probe() - PCI driver probe callback
* @pdev: pci device
* @pdev: pci device
...
@@ -110,6 +117,10 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -110,6 +117,10 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct
ish_hw
*
hw
;
struct
ish_hw
*
hw
;
int
ret
;
int
ret
;
/* Check for invalid platforms for ISH support */
if
(
pci_dev_present
(
ish_invalid_pci_ids
))
return
-
ENODEV
;
/* enable pci dev */
/* enable pci dev */
ret
=
pci_enable_device
(
pdev
);
ret
=
pci_enable_device
(
pdev
);
if
(
ret
)
{
if
(
ret
)
{
...
@@ -172,7 +183,6 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -172,7 +183,6 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
free_irq
(
pdev
->
irq
,
dev
);
free_irq
(
pdev
->
irq
,
dev
);
free_device:
free_device:
pci_iounmap
(
pdev
,
hw
->
mem_addr
);
pci_iounmap
(
pdev
,
hw
->
mem_addr
);
kfree
(
dev
);
release_regions:
release_regions:
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
disable_device:
disable_device:
...
@@ -202,7 +212,6 @@ static void ish_remove(struct pci_dev *pdev)
...
@@ -202,7 +212,6 @@ static void ish_remove(struct pci_dev *pdev)
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
pci_clear_master
(
pdev
);
pci_clear_master
(
pdev
);
pci_disable_device
(
pdev
);
pci_disable_device
(
pdev
);
kfree
(
ishtp_dev
);
}
}
static
struct
device
__maybe_unused
*
ish_resume_device
;
static
struct
device
__maybe_unused
*
ish_resume_device
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment