Re: [PATCH v2 4/9] clk: qcom: create virtual child device for TSENS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/16, Rajendra Nayak wrote:
> @@ -3520,7 +3522,26 @@ static int gcc_msm8960_probe(struct platform_device *pdev)
>  	if (IS_ERR(clk))
>  		return PTR_ERR(clk);
>  
> -	return qcom_cc_probe(pdev, match->data);
> +	ret = qcom_cc_probe(pdev, match->data);
> +	if (ret)
> +		return ret;
> +
> +	tsens = platform_device_alloc("qcom-tsens", -1);
> +	if (!tsens) {
> +		ret = -ENOMEM;
> +		goto err_alloc;
> +	}
> +
> +	tsens->dev.parent = &pdev->dev;
> +	ret = platform_device_add(tsens);
> +	if (ret)
> +		goto err_add;

platform_device_register_data() instead of all these lines? We
should probably remove the device when this driver is removed
too.

> +	return 0;

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux