aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-3.13/004-MIPS-BCM63XX-add-HSSPI-IRQ-and-register-offsets.patch
stat options
Period:
Authors:

Commits per author per week (path 'target/linux/brcm63xx/patches-3.13/004-MIPS-BCM63XX-add-HSSPI-IRQ-and-register-offsets.patch')

AuthorW31 2024W32 2024W33 2024W34 2024Total
Total00000
href='#n15'>15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
/*
 *  Atheros AR71xx minimal nvram support
 *
 *  Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
 *
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License version 2 as published
 *  by the Free Software Foundation.
 */

#include <linux/kernel.h>
#include <linux/vmalloc.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/string.h>

#include "nvram.h"

char *ath79_nvram_find_var(const char *name, const char *buf, unsigned buf_len)
{
	unsigned len = strlen(name);
	char *cur, *last;

	if (buf_len == 0 || len == 0)
		return NULL;

	if (buf_len < len)
		return NULL;

	if (len == 1)
		return memchr(buf, (int) *name, buf_len);