Re: [PATCH] media: dvb/earth-pt1: fix wrong initialization for demod blocks

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

 



Hi,
thank you for reviewing my patch,
 ( <20190110095623.28070-1-tskd08@xxxxxxxxx>
   https://patchwork.linuxtv.org/patch/53834/ ),
and excuse me for my late reply.
I somehow lost your mail and noticed it just today by checking Patchwork.

On Mon, 18 Feb 2019 21:04:28 +0000, you wrote:
> It might be possible to simplify the code a little by using strcmp() and
> making it into one loop, like so:
> 
> 	for (i = 0; i < PT1_NR_ADAPS; i++) {
> 		cl = pt1->adaps[i]->demod_i2c_client;
> 		if (strcmp(cl->name, TC90522_I2C_DEV_SAT) &&
> 		    strcmp(cl->name, TC90522_I2C_DEV_TER)) 
> 			continue;
> 
> 		ret = i2c_master_send(cl, buf, 2);
> 		if (ret < 0)
> 			return ret;
> 
> 		usleep_range(30000, 50000);
> 	}

Any "cl" has the name of either TC90522_I2C_DEV_SAT or TC90522_I2C_DEV_TER,
and no other name exists.  (adaps[0],adaps[2]: _SAT, adaps[1],adaps[3]: _TER)
The purpose of the code is to ensure that TER clients are processed
BEFORE SAT clients, as noted in the header comment of this function.
So I am afraid that unifying the two loops does not work.

--
Akihiro



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux