[PATCH ath-next v2 5/5] wifi: ath12k: Enable IPQ5424 WiFi device support

Jeff Johnson jeff.johnson at oss.qualcomm.com
Tue May 20 09:27:57 PDT 2025


On 5/18/2025 11:22 AM, Raj Kumar Bhagat wrote:
> @@ -1008,24 +1011,19 @@ static int ath12k_ahb_probe(struct platform_device *pdev)
>  	if (!ab)
>  		return -ENOMEM;
>  
> -	hw_rev = (enum ath12k_hw_rev)(kernel_ulong_t)of_device_get_match_data(&pdev->dev);
> -	switch (hw_rev) {
> -	case ATH12K_HW_IPQ5332_HW10:
> -		hif_ops = &ath12k_ahb_hif_ops_ipq5332;
> -		userpd_id = ATH12K_IPQ5332_USERPD_ID;
> -		break;
> -	default:
> +	ab_ahb = ath12k_ab_to_ahb(ab);
> +	ab_ahb->ab = ab;
> +	ab_ahb->ahb_data =
> +		(struct ath12k_ahb_probe_data *)of_device_get_match_data(&pdev->dev);

seems like an unnecessary (and incorrect?) typecast
ahb_data is const struct ath12k_ahb_probe_data *
of_device_get_match_data() returns const void *
so the const void * => const struct ath12k_ahb_probe_data *
promotion should happen automatically, without typecasting away the const
qualifier




More information about the ath12k mailing list