mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 14:17:43 +00:00
crypto/nx: Add nx842_add_coprocs_list function
Updating coprocessor list is moved to nx842_add_coprocs_list(). This function will be used for both icswx and VAS functions. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
1ee51b28ee
commit
cd38a8a8a2
1 changed files with 9 additions and 3 deletions
|
@ -550,6 +550,14 @@ static int nx842_powernv_decompress(const unsigned char *in, unsigned int inlen,
|
|||
wmem, CCW_FC_842_DECOMP_CRC);
|
||||
}
|
||||
|
||||
static inline void nx842_add_coprocs_list(struct nx842_coproc *coproc,
|
||||
int chipid)
|
||||
{
|
||||
coproc->chip_id = chipid;
|
||||
INIT_LIST_HEAD(&coproc->list);
|
||||
list_add(&coproc->list, &nx842_coprocs);
|
||||
}
|
||||
|
||||
static int __init nx842_powernv_probe(struct device_node *dn)
|
||||
{
|
||||
struct nx842_coproc *coproc;
|
||||
|
@ -576,11 +584,9 @@ static int __init nx842_powernv_probe(struct device_node *dn)
|
|||
if (!coproc)
|
||||
return -ENOMEM;
|
||||
|
||||
coproc->chip_id = chip_id;
|
||||
coproc->ct = ct;
|
||||
coproc->ci = ci;
|
||||
INIT_LIST_HEAD(&coproc->list);
|
||||
list_add(&coproc->list, &nx842_coprocs);
|
||||
nx842_add_coprocs_list(coproc, chip_id);
|
||||
|
||||
pr_info("coprocessor found on chip %d, CT %d CI %d\n", chip_id, ct, ci);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue