<commit_before>/*
 * Copyright (c) 2018 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <device.h>
#include <errno.h>
#include <drivers/led.h>
#include <sys/util.h>
#include <zephyr.h>

#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#include <logging/log.h>
LOG_MODULE_REGISTER(app);

#define LED_DEV_NAME DT_LABEL(DT_INST(0, ti_lp3943))
#define NUM_LEDS 16

#define DELAY_TIME K_MSEC(1000)

void main(void)
{
	const struct device *led_dev;
	int i, ret;

	led_dev = device_get_binding(LED_DEV_NAME);
	if (led_dev) {
		LOG_INF("Found LED device %s", LED_DEV_NAME);
	} else {
		LOG_ERR("LED device %s not found", LED_DEV_NAME);
		return;
	}<commit_msg>samples: led_lp3943: drop device_get_binding/DT_INST<commit_after>/*
 * Copyright (c) 2018 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <device.h>
#include <errno.h>
#include <drivers/led.h>
#include <sys/util.h>
#include <zephyr.h>

#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#include <logging/log.h>
LOG_MODULE_REGISTER(app);

#define NUM_LEDS 16

#define DELAY_TIME K_MSEC(1000)

void main(void)
{
	const struct device *led_dev = DEVICE_DT_GET_ANY(ti_lp3943);
	int i, ret;

	if (!led_dev) {
		LOG_ERR("No device with compatible ti,lp3943 found");
		return;
	} else if (!device_is_ready(led_dev)) {
		LOG_ERR("LED device %s not ready", led_dev->name);
		return;
	} else {
		LOG_INF("Found LED device %s", led_dev->name);
	}
{'fraction_non_alphanumeric': 0.13732394366197184, 'fraction_numerical': 0.028873239436619718, 'mean_word_length': 5.178260869565217, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1441814', 'n_tokens_mistral': 611, 'n_tokens_neox': 566, 'n_words': 128}