File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -902,15 +902,16 @@ static int rkcanfd_probe(struct platform_device *pdev)
902
902
priv -> can .data_bittiming_const = & rkcanfd_data_bittiming_const ;
903
903
priv -> can .ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |
904
904
CAN_CTRLMODE_BERR_REPORTING ;
905
- if (!(priv -> devtype_data .quirks & RKCANFD_QUIRK_CANFD_BROKEN ))
906
- priv -> can .ctrlmode_supported |= CAN_CTRLMODE_FD ;
907
905
priv -> can .do_set_mode = rkcanfd_set_mode ;
908
906
priv -> can .do_get_berr_counter = rkcanfd_get_berr_counter ;
909
907
priv -> ndev = ndev ;
910
908
911
909
match = device_get_match_data (& pdev -> dev );
912
- if (match )
910
+ if (match ) {
913
911
priv -> devtype_data = * (struct rkcanfd_devtype_data * )match ;
912
+ if (!(priv -> devtype_data .quirks & RKCANFD_QUIRK_CANFD_BROKEN ))
913
+ priv -> can .ctrlmode_supported |= CAN_CTRLMODE_FD ;
914
+ }
914
915
915
916
err = can_rx_offload_add_manual (ndev , & priv -> offload ,
916
917
RKCANFD_NAPI_WEIGHT );
You can’t perform that action at this time.
0 commit comments