[ragnatech:media-tree 369/405] drivers/media/dvb-frontends/af9013.c:1560: undefined reference to `i2c_mux_del_adapters'

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

 



Hi Mauro,

It's probably a bug fix that unveils the link errors.

tree:   git://git.ragnatech.se/linux media-tree
head:   f67449fdba3b9dbdd340d8cbf17dfa711d5bd2fb
commit: 238f694e1b7f8297f1256c57e41f69c39576c9b4 [369/405] media: v4l2-common: fix a compilation breakage
config: x86_64-randconfig-s4-03231521 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 238f694e1b7f8297f1256c57e41f69c39576c9b4
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/media/dvb-frontends/af9013.o: In function `af9013_remove':
>> drivers/media/dvb-frontends/af9013.c:1560: undefined reference to `i2c_mux_del_adapters'
   drivers/media/dvb-frontends/af9013.o: In function `af9013_probe':
>> drivers/media/dvb-frontends/af9013.c:1488: undefined reference to `i2c_mux_alloc'
>> drivers/media/dvb-frontends/af9013.c:1495: undefined reference to `i2c_mux_add_adapter'
   drivers/media/dvb-frontends/af9013.c:1544: undefined reference to `i2c_mux_del_adapters'

vim +1560 drivers/media/dvb-frontends/af9013.c

f458a1bc67 Antti Palosaari 2017-06-12  1443  
82d1ce3eba Antti Palosaari 2017-06-10  1444  static int af9013_probe(struct i2c_client *client,
82d1ce3eba Antti Palosaari 2017-06-10  1445  			const struct i2c_device_id *id)
82d1ce3eba Antti Palosaari 2017-06-10  1446  {
82d1ce3eba Antti Palosaari 2017-06-10  1447  	struct af9013_state *state;
82d1ce3eba Antti Palosaari 2017-06-10  1448  	struct af9013_platform_data *pdata = client->dev.platform_data;
d029799b2f Antti Palosaari 2017-06-12  1449  	struct dtv_frontend_properties *c;
82d1ce3eba Antti Palosaari 2017-06-10  1450  	int ret, i;
82d1ce3eba Antti Palosaari 2017-06-10  1451  	u8 firmware_version[4];
f458a1bc67 Antti Palosaari 2017-06-12  1452  	static const struct regmap_bus regmap_bus = {
f458a1bc67 Antti Palosaari 2017-06-12  1453  		.read = af9013_regmap_read,
f458a1bc67 Antti Palosaari 2017-06-12  1454  		.write = af9013_regmap_write,
f458a1bc67 Antti Palosaari 2017-06-12  1455  	};
f458a1bc67 Antti Palosaari 2017-06-12  1456  	static const struct regmap_config regmap_config = {
22e59e7204 Antti Palosaari 2017-06-22  1457  		/* Actual reg is 16 bits, see i2c adapter lock */
22e59e7204 Antti Palosaari 2017-06-22  1458  		.reg_bits = 24,
f458a1bc67 Antti Palosaari 2017-06-12  1459  		.val_bits = 8,
f458a1bc67 Antti Palosaari 2017-06-12  1460  	};
82d1ce3eba Antti Palosaari 2017-06-10  1461  
82d1ce3eba Antti Palosaari 2017-06-10  1462  	state = kzalloc(sizeof(*state), GFP_KERNEL);
82d1ce3eba Antti Palosaari 2017-06-10  1463  	if (!state) {
82d1ce3eba Antti Palosaari 2017-06-10  1464  		ret = -ENOMEM;
82d1ce3eba Antti Palosaari 2017-06-10  1465  		goto err;
82d1ce3eba Antti Palosaari 2017-06-10  1466  	}
82d1ce3eba Antti Palosaari 2017-06-10  1467  
22e59e7204 Antti Palosaari 2017-06-22  1468  	dev_dbg(&client->dev, "\n");
22e59e7204 Antti Palosaari 2017-06-22  1469  
82d1ce3eba Antti Palosaari 2017-06-10  1470  	/* Setup the state */
82d1ce3eba Antti Palosaari 2017-06-10  1471  	state->client = client;
82d1ce3eba Antti Palosaari 2017-06-10  1472  	i2c_set_clientdata(client, state);
82d1ce3eba Antti Palosaari 2017-06-10  1473  	state->clk = pdata->clk;
82d1ce3eba Antti Palosaari 2017-06-10  1474  	state->tuner = pdata->tuner;
82d1ce3eba Antti Palosaari 2017-06-10  1475  	state->if_frequency = pdata->if_frequency;
82d1ce3eba Antti Palosaari 2017-06-10  1476  	state->ts_mode = pdata->ts_mode;
eaa455f023 Antti Palosaari 2017-06-13  1477  	state->ts_output_pin = pdata->ts_output_pin;
82d1ce3eba Antti Palosaari 2017-06-10  1478  	state->spec_inv = pdata->spec_inv;
82d1ce3eba Antti Palosaari 2017-06-10  1479  	memcpy(&state->api_version, pdata->api_version, sizeof(state->api_version));
82d1ce3eba Antti Palosaari 2017-06-10  1480  	memcpy(&state->gpio, pdata->gpio, sizeof(state->gpio));
f458a1bc67 Antti Palosaari 2017-06-12  1481  	state->regmap = regmap_init(&client->dev, &regmap_bus, client,
f458a1bc67 Antti Palosaari 2017-06-12  1482  				  &regmap_config);
f458a1bc67 Antti Palosaari 2017-06-12  1483  	if (IS_ERR(state->regmap)) {
f458a1bc67 Antti Palosaari 2017-06-12  1484  		ret = PTR_ERR(state->regmap);
f458a1bc67 Antti Palosaari 2017-06-12  1485  		goto err_kfree;
f458a1bc67 Antti Palosaari 2017-06-12  1486  	}
22e59e7204 Antti Palosaari 2017-06-22  1487  	/* Create mux i2c adapter */
22e59e7204 Antti Palosaari 2017-06-22 @1488  	state->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0,
22e59e7204 Antti Palosaari 2017-06-22  1489  				    af9013_select, af9013_deselect);
22e59e7204 Antti Palosaari 2017-06-22  1490  	if (!state->muxc) {
22e59e7204 Antti Palosaari 2017-06-22  1491  		ret = -ENOMEM;
22e59e7204 Antti Palosaari 2017-06-22  1492  		goto err_regmap_exit;
22e59e7204 Antti Palosaari 2017-06-22  1493  	}
22e59e7204 Antti Palosaari 2017-06-22  1494  	state->muxc->priv = state;
22e59e7204 Antti Palosaari 2017-06-22 @1495  	ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0);
22e59e7204 Antti Palosaari 2017-06-22  1496  	if (ret)
22e59e7204 Antti Palosaari 2017-06-22  1497  		goto err_regmap_exit;
82d1ce3eba Antti Palosaari 2017-06-10  1498  
82d1ce3eba Antti Palosaari 2017-06-10  1499  	/* Download firmware */
eaa455f023 Antti Palosaari 2017-06-13  1500  	if (state->ts_mode != AF9013_TS_MODE_USB) {
82d1ce3eba Antti Palosaari 2017-06-10  1501  		ret = af9013_download_firmware(state);
82d1ce3eba Antti Palosaari 2017-06-10  1502  		if (ret)
22e59e7204 Antti Palosaari 2017-06-22  1503  			goto err_i2c_mux_del_adapters;
82d1ce3eba Antti Palosaari 2017-06-10  1504  	}
82d1ce3eba Antti Palosaari 2017-06-10  1505  
82d1ce3eba Antti Palosaari 2017-06-10  1506  	/* Firmware version */
f458a1bc67 Antti Palosaari 2017-06-12  1507  	ret = regmap_bulk_read(state->regmap, 0x5103, firmware_version,
82d1ce3eba Antti Palosaari 2017-06-10  1508  			       sizeof(firmware_version));
82d1ce3eba Antti Palosaari 2017-06-10  1509  	if (ret)
22e59e7204 Antti Palosaari 2017-06-22  1510  		goto err_i2c_mux_del_adapters;
82d1ce3eba Antti Palosaari 2017-06-10  1511  
82d1ce3eba Antti Palosaari 2017-06-10  1512  	/* Set GPIOs */
82d1ce3eba Antti Palosaari 2017-06-10  1513  	for (i = 0; i < sizeof(state->gpio); i++) {
82d1ce3eba Antti Palosaari 2017-06-10  1514  		ret = af9013_set_gpio(state, i, state->gpio[i]);
82d1ce3eba Antti Palosaari 2017-06-10  1515  		if (ret)
22e59e7204 Antti Palosaari 2017-06-22  1516  			goto err_i2c_mux_del_adapters;
82d1ce3eba Antti Palosaari 2017-06-10  1517  	}
82d1ce3eba Antti Palosaari 2017-06-10  1518  
82d1ce3eba Antti Palosaari 2017-06-10  1519  	/* Create dvb frontend */
82d1ce3eba Antti Palosaari 2017-06-10  1520  	memcpy(&state->fe.ops, &af9013_ops, sizeof(state->fe.ops));
82d1ce3eba Antti Palosaari 2017-06-10  1521  	state->fe.demodulator_priv = state;
82d1ce3eba Antti Palosaari 2017-06-10  1522  
82d1ce3eba Antti Palosaari 2017-06-10  1523  	/* Setup callbacks */
82d1ce3eba Antti Palosaari 2017-06-10  1524  	pdata->get_dvb_frontend = af9013_get_dvb_frontend;
22e59e7204 Antti Palosaari 2017-06-22  1525  	pdata->get_i2c_adapter = af9013_get_i2c_adapter;
83d6b7c327 Antti Palosaari 2017-06-26  1526  	pdata->pid_filter = af9013_pid_filter;
83d6b7c327 Antti Palosaari 2017-06-26  1527  	pdata->pid_filter_ctrl = af9013_pid_filter_ctrl;
82d1ce3eba Antti Palosaari 2017-06-10  1528  
d029799b2f Antti Palosaari 2017-06-12  1529  	/* Init stats to indicate which stats are supported */
d029799b2f Antti Palosaari 2017-06-12  1530  	c = &state->fe.dtv_property_cache;
943a720f5c Antti Palosaari 2017-06-18  1531  	c->strength.len = 1;
d029799b2f Antti Palosaari 2017-06-12  1532  	c->cnr.len = 1;
233f3ef71c Antti Palosaari 2017-06-18  1533  	c->post_bit_error.len = 1;
233f3ef71c Antti Palosaari 2017-06-18  1534  	c->post_bit_count.len = 1;
233f3ef71c Antti Palosaari 2017-06-18  1535  	c->block_error.len = 1;
233f3ef71c Antti Palosaari 2017-06-18  1536  	c->block_count.len = 1;
d029799b2f Antti Palosaari 2017-06-12  1537  
82d1ce3eba Antti Palosaari 2017-06-10  1538  	dev_info(&client->dev, "Afatech AF9013 successfully attached\n");
82d1ce3eba Antti Palosaari 2017-06-10  1539  	dev_info(&client->dev, "firmware version: %d.%d.%d.%d\n",
82d1ce3eba Antti Palosaari 2017-06-10  1540  		 firmware_version[0], firmware_version[1],
82d1ce3eba Antti Palosaari 2017-06-10  1541  		 firmware_version[2], firmware_version[3]);
82d1ce3eba Antti Palosaari 2017-06-10  1542  	return 0;
22e59e7204 Antti Palosaari 2017-06-22  1543  err_i2c_mux_del_adapters:
22e59e7204 Antti Palosaari 2017-06-22  1544  	i2c_mux_del_adapters(state->muxc);
f458a1bc67 Antti Palosaari 2017-06-12  1545  err_regmap_exit:
f458a1bc67 Antti Palosaari 2017-06-12  1546  	regmap_exit(state->regmap);
82d1ce3eba Antti Palosaari 2017-06-10  1547  err_kfree:
82d1ce3eba Antti Palosaari 2017-06-10  1548  	kfree(state);
82d1ce3eba Antti Palosaari 2017-06-10  1549  err:
82d1ce3eba Antti Palosaari 2017-06-10  1550  	dev_dbg(&client->dev, "failed %d\n", ret);
82d1ce3eba Antti Palosaari 2017-06-10  1551  	return ret;
82d1ce3eba Antti Palosaari 2017-06-10  1552  }
82d1ce3eba Antti Palosaari 2017-06-10  1553  
82d1ce3eba Antti Palosaari 2017-06-10  1554  static int af9013_remove(struct i2c_client *client)
82d1ce3eba Antti Palosaari 2017-06-10  1555  {
82d1ce3eba Antti Palosaari 2017-06-10  1556  	struct af9013_state *state = i2c_get_clientdata(client);
82d1ce3eba Antti Palosaari 2017-06-10  1557  
82d1ce3eba Antti Palosaari 2017-06-10  1558  	dev_dbg(&client->dev, "\n");
82d1ce3eba Antti Palosaari 2017-06-10  1559  
22e59e7204 Antti Palosaari 2017-06-22 @1560  	i2c_mux_del_adapters(state->muxc);
22e59e7204 Antti Palosaari 2017-06-22  1561  
f458a1bc67 Antti Palosaari 2017-06-12  1562  	regmap_exit(state->regmap);
f458a1bc67 Antti Palosaari 2017-06-12  1563  
82d1ce3eba Antti Palosaari 2017-06-10  1564  	kfree(state);
82d1ce3eba Antti Palosaari 2017-06-10  1565  
82d1ce3eba Antti Palosaari 2017-06-10  1566  	return 0;
82d1ce3eba Antti Palosaari 2017-06-10  1567  }
82d1ce3eba Antti Palosaari 2017-06-10  1568  

:::::: The code at line 1560 was first introduced by commit
:::::: 22e59e7204a46d9f3c6abc02909927a19640f91f media: af9013: add i2c mux adapter for tuner bus

:::::: TO: Antti Palosaari <crope@xxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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