lkml.org 
[lkml]   [2022]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/2] media: i2c: add support for ov4689
From
On 11/09/2022 22:01, Mikhail Rudenko wrote:
> +static const struct i2c_device_id ov4689_id[] = {
> + { "ov4689", 0 },
> + {},
> +};
> +MODULE_DEVICE_TABLE(i2c, ov4689_id);
> +
> +static const struct of_device_id ov4689_of_match[] = {
> + { .compatible = "ovti,ov4689" },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, ov4689_of_match);
> +
> +static struct i2c_driver ov4689_i2c_driver = {
> + .driver = {
> + .name = "ov4689",
> + .pm = &ov4689_pm_ops,
> + .of_match_table = of_match_ptr(ov4689_of_match),

of_match_ptr is usually paired with maybe_unused, otherwise you will
have compile test warnings.

> + },
> + .probe = ov4689_probe,
> + .remove = ov4689_remove,
> + .id_table = ov4689_id,
> +};
> +
> +module_i2c_driver(ov4689_i2c_driver);
> +
> +MODULE_DESCRIPTION("OmniVision ov4689 sensor driver");
> +MODULE_LICENSE("GPL");


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-09-12 12:57    [W:0.187 / U:1.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site