static struct pending_op *pending_ccc_new(struct bt_att *att,
					struct gatt_db_attribute *attrib,
					uint16_t value,
					uint8_t link_type)
{
	struct pending_op *op;
	struct btd_device *device;

	device = att_get_device(att);
	if (!device) {
		error("Unable to find device object");
		return NULL;
	}

	op = new0(struct pending_op, 1);

	op->data.iov_base = UINT_TO_PTR(value);
	op->data.iov_len = sizeof(value);

	op->att = bt_att_ref(att);
	op->attrib = attrib;
	op->link_type = link_type;

	bt_att_register_disconnect(att,
				   pending_disconnect_cb,
				   op,
				   NULL);

	return op;
}
static struct pending_op *pending_ccc_new(struct bt_att *att,
					struct gatt_db_attribute *attrib,
					uint16_t value,
					uint8_t link_type)
{
	struct pending_op *op;
	struct btd_device *device;

	device = att_get_device(att);
	if (!device) {
		error("Unable to find device object");
		return NULL;
	}

	op = new0(struct pending_op, 1);

	op->data.iov_base = UINT_TO_PTR(value);
	op->data.iov_len = sizeof(value);

	op->att = bt_att_ref(att);
	op->attrib = attrib;
	op->link_type = link_type;

	bt_att_register_disconnect(att,
				   pending_disconnect_cb,
				   op,
				   NULL);

	return op;
}