@@ -312,7 +312,7 @@ static const struct ov10635_reg {
312
312
313
313
struct rdacm20_device {
314
314
struct device * dev ;
315
- struct max9271_device * serializer ;
315
+ struct max9271_device serializer ;
316
316
struct i2c_client * sensor ;
317
317
struct v4l2_subdev sd ;
318
318
struct media_pad pad ;
@@ -399,7 +399,7 @@ static int rdacm20_s_stream(struct v4l2_subdev *sd, int enable)
399
399
{
400
400
struct rdacm20_device * dev = sd_to_rdacm20 (sd );
401
401
402
- return max9271_set_serial_link (dev -> serializer , enable );
402
+ return max9271_set_serial_link (& dev -> serializer , enable );
403
403
}
404
404
405
405
static int rdacm20_enum_mbus_code (struct v4l2_subdev * sd ,
@@ -455,46 +455,46 @@ static int rdacm20_initialize(struct rdacm20_device *dev)
455
455
unsigned int retry = 3 ;
456
456
int ret ;
457
457
458
- max9271_wake_up (dev -> serializer );
458
+ max9271_wake_up (& dev -> serializer );
459
459
460
460
/* Serial link disabled during config as it needs a valid pixel clock. */
461
- ret = max9271_set_serial_link (dev -> serializer , false);
461
+ ret = max9271_set_serial_link (& dev -> serializer , false);
462
462
if (ret )
463
463
return ret ;
464
464
465
465
/*
466
466
* Ensure that we have a good link configuration before attempting to
467
467
* identify the device.
468
468
*/
469
- max9271_configure_i2c (dev -> serializer , MAX9271_I2CSLVSH_469NS_234NS |
470
- MAX9271_I2CSLVTO_1024US |
471
- MAX9271_I2CMSTBT_105KBPS );
469
+ max9271_configure_i2c (& dev -> serializer , MAX9271_I2CSLVSH_469NS_234NS |
470
+ MAX9271_I2CSLVTO_1024US |
471
+ MAX9271_I2CMSTBT_105KBPS );
472
472
473
- max9271_configure_gmsl_link (dev -> serializer );
473
+ max9271_configure_gmsl_link (& dev -> serializer );
474
474
475
- ret = max9271_verify_id (dev -> serializer );
475
+ ret = max9271_verify_id (& dev -> serializer );
476
476
if (ret < 0 )
477
477
return ret ;
478
478
479
- ret = max9271_set_address (dev -> serializer , dev -> addrs [0 ]);
479
+ ret = max9271_set_address (& dev -> serializer , dev -> addrs [0 ]);
480
480
if (ret < 0 )
481
481
return ret ;
482
- dev -> serializer -> client -> addr = dev -> addrs [0 ];
482
+ dev -> serializer . client -> addr = dev -> addrs [0 ];
483
483
484
484
/*
485
485
* Reset the sensor by cycling the OV10635 reset signal connected to the
486
486
* MAX9271 GPIO1 and verify communication with the OV10635.
487
487
*/
488
- ret = max9271_enable_gpios (dev -> serializer , MAX9271_GPIO1OUT );
488
+ ret = max9271_enable_gpios (& dev -> serializer , MAX9271_GPIO1OUT );
489
489
if (ret )
490
490
return ret ;
491
491
492
- ret = max9271_clear_gpios (dev -> serializer , MAX9271_GPIO1OUT );
492
+ ret = max9271_clear_gpios (& dev -> serializer , MAX9271_GPIO1OUT );
493
493
if (ret )
494
494
return ret ;
495
495
usleep_range (10000 , 15000 );
496
496
497
- ret = max9271_set_gpios (dev -> serializer , MAX9271_GPIO1OUT );
497
+ ret = max9271_set_gpios (& dev -> serializer , MAX9271_GPIO1OUT );
498
498
if (ret )
499
499
return ret ;
500
500
usleep_range (10000 , 15000 );
@@ -552,13 +552,7 @@ static int rdacm20_probe(struct i2c_client *client)
552
552
if (!dev )
553
553
return - ENOMEM ;
554
554
dev -> dev = & client -> dev ;
555
-
556
- dev -> serializer = devm_kzalloc (& client -> dev , sizeof (* dev -> serializer ),
557
- GFP_KERNEL );
558
- if (!dev -> serializer )
559
- return - ENOMEM ;
560
-
561
- dev -> serializer -> client = client ;
555
+ dev -> serializer .client = client ;
562
556
563
557
ret = of_property_read_u32_array (client -> dev .of_node , "reg" ,
564
558
dev -> addrs , 2 );
0 commit comments